diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2012-12-21 07:41:01 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-12-21 07:41:01 -0500 |
| commit | fdea599f61c93bd9cd9d1207fe57d3864244e45b (patch) | |
| tree | b0c98bb3bf06ff097889fed3fc3cf75e00c7bd65 /test | |
| parent | ed0729c8469cc333ef8a6c5b8f3c6738b6a01da6 (diff) | |
| parent | eed4a210a874491a031a0919f7ae95a7caab8070 (diff) | |
| download | python-coveragepy-fdea599f61c93bd9cd9d1207fe57d3864244e45b.tar.gz | |
Automated merge with ssh://bitbucket.org/ned/coveragepy
Diffstat (limited to 'test')
| -rw-r--r-- | test/eggsrc/setup.py | 2 | ||||
| -rw-r--r-- | test/test_codeunit.py | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/eggsrc/setup.py b/test/eggsrc/setup.py index 6a88a58..f9b8b9d 100644 --- a/test/eggsrc/setup.py +++ b/test/eggsrc/setup.py @@ -3,4 +3,6 @@ from setuptools import setup setup( name="covtestegg1", packages=['egg1'], + zip_safe=True, + install_requires=[], ) diff --git a/test/test_codeunit.py b/test/test_codeunit.py index b543949..a568fe5 100644 --- a/test/test_codeunit.py +++ b/test/test_codeunit.py @@ -89,7 +89,14 @@ class CodeUnitTest(CoverageTest): assert bcu > acu and bcu >= acu and bcu != acu def test_egg(self): + # Test that we can get files out of eggs, and read their source files. + # The egg1 module is installed by an action in igor.py. import egg1, egg1.egg1 + # Verify that we really imported from an egg. If we did, then the + # __file__ won't be an actual file, because one of the "directories" + # in the path is actually the .egg zip file. + self.assert_doesnt_exist(egg1.__file__) + cu = code_unit_factory([egg1, egg1.egg1], FileLocator()) self.assertEqual(cu[0].source_file().read(), "") self.assertEqual(cu[1].source_file().read().split("\n")[0], |
