From 9fad1bddd3d162013f1248d3ba1fa93bacea5a7b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 13 Dec 2009 17:21:58 -0500 Subject: version_info is a nicer way to check Python versions than hexversion is. --- coverage/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/files.py') diff --git a/coverage/files.py b/coverage/files.py index ba228c2..3968b56 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -67,7 +67,7 @@ class FileLocator(object): data = zi.get_data(parts[1]) except IOError: continue - if sys.hexversion > 0x03000000: + if sys.version_info >= (3, 0): data = data.decode('utf8') # TODO: How to do this properly? return data return None -- cgit v1.2.1 From 267506432b81cd9cf95f0062076a963d7adcbc02 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 27 Dec 2009 23:02:29 -0500 Subject: Add more tests of omitting files during HTML reporting, and a better way to enable re-importing modules during test_farm tests. --- coverage/files.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'coverage/files.py') diff --git a/coverage/files.py b/coverage/files.py index 3968b56..bf60f8b 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -38,6 +38,8 @@ class FileLocator(object): f = os.path.basename(f) if not os.path.isabs(f): for path in [os.curdir] + sys.path: + if path is None: + continue g = os.path.join(path, f) if os.path.exists(g): f = g -- cgit v1.2.1