From ca85f635d345ebcdd5fae5e235bd22573aa11e9a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 6 Sep 2012 22:54:35 -0400 Subject: Where we deal with .pyc files, also deal with .pyo files. Fixes #195. --- coverage/codeunit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/codeunit.py') diff --git a/coverage/codeunit.py b/coverage/codeunit.py index 1999c50..eb55489 100644 --- a/coverage/codeunit.py +++ b/coverage/codeunit.py @@ -52,7 +52,7 @@ class CodeUnit(object): else: f = morf # .pyc files should always refer to a .py instead. - if f.endswith('.pyc'): + if f.endswith('.pyc') or f.endswith('.pyo'): f = f[:-1] self.filename = self.file_locator.canonical_filename(f) -- cgit v1.2.1