diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-10-26 17:00:30 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-10-26 17:00:30 -0400 |
commit | 319732d38dda3a0897c78b82f0f5597fe32a8183 (patch) | |
tree | 6831bd692c5a847824d8dfccf32ae60587cd20c5 /coverage/control.py | |
parent | 48e5456376c0937b47df99862f2c4ab29fea599c (diff) | |
download | python-coveragepy-git-319732d38dda3a0897c78b82f0f5597fe32a8183.tar.gz |
Test on PyPy3
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/coverage/control.py b/coverage/control.py index 4c087655..d2110552 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -248,7 +248,11 @@ class Coverage(object): # PyPy 2.4 has no __file__ in the builtin modules, but the code # objects still have the filenames. So dig into one to find # the path to exclude. - structseq_file = _structseq.structseq_new.func_code.co_filename + structseq_new = _structseq.structseq_new + try: + structseq_file = structseq_new.func_code.co_filename + except AttributeError: + structseq_file = structseq_new.__code__.co_filename self.pylib_dirs.add(self._canonical_dir(structseq_file)) # To avoid tracing the coverage code itself, we skip anything located |