summaryrefslogtreecommitdiff
path: root/test/test_codeunit.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-29 22:21:48 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-29 22:21:48 -0400
commitc7f90f9e930835a955df59bffe96e996dfcf11a0 (patch)
treeab7392478c60177f4912c40e9febae1e517ff3c6 /test/test_codeunit.py
parentc1d4f46e580ee4eab17c527f94a01e825a496e42 (diff)
downloadpython-coveragepy-c7f90f9e930835a955df59bffe96e996dfcf11a0.tar.gz
Working toward reading source from eggs, but this isn't right on Py3k yet.
Diffstat (limited to 'test/test_codeunit.py')
-rw-r--r--test/test_codeunit.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_codeunit.py b/test/test_codeunit.py
index 36ca1fc..0c2fc98 100644
--- a/test/test_codeunit.py
+++ b/test/test_codeunit.py
@@ -71,3 +71,12 @@ class CodeUnitTest(CoverageTest):
assert zcu > acu and zcu >= acu and zcu != acu
assert acu < bcu and acu <= bcu and acu != bcu
assert bcu > acu and bcu >= acu and bcu != acu
+
+ def test_egg(self):
+ import egg1, egg1.egg1
+ 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],
+ "# My egg file!"
+ )
+ \ No newline at end of file