From 825acb3051853f0ac849df5bc15920ba932391e1 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 1999c50c..eb55489d 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