summaryrefslogtreecommitdiff
path: root/test/test_codeunit.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-12-18 20:46:40 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-12-18 20:46:40 -0500
commit335aa02cd95352581d08578ad6d9009c2db12d1b (patch)
treea8c50a6657485f19dec7c6c26a3bf74534bf04e6 /test/test_codeunit.py
parent97292be9173e455a4f9ceefcb1e0dd1bae13ad4f (diff)
downloadpython-coveragepy-git-335aa02cd95352581d08578ad6d9009c2db12d1b.tar.gz
This wasn't testing code unit comparisons directly. Now it is.
Diffstat (limited to 'test/test_codeunit.py')
-rw-r--r--test/test_codeunit.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_codeunit.py b/test/test_codeunit.py
index ad073827..35387ba3 100644
--- a/test/test_codeunit.py
+++ b/test/test_codeunit.py
@@ -64,10 +64,10 @@ class CodeUnitTest(CoverageTest):
self.assertEqual(cu[2].source_file().read(), "# cfile.py\n")
def test_comparison(self):
- acu = code_unit_factory("aa/afile.py", FileLocator())
- acu2 = code_unit_factory("aa/afile.py", FileLocator())
- zcu = code_unit_factory("aa/zfile.py", FileLocator())
- bcu = code_unit_factory("aa/bb/bfile.py", FileLocator())
+ acu = code_unit_factory("aa/afile.py", FileLocator())[0]
+ acu2 = code_unit_factory("aa/afile.py", FileLocator())[0]
+ zcu = code_unit_factory("aa/zfile.py", FileLocator())[0]
+ bcu = code_unit_factory("aa/bb/bfile.py", FileLocator())[0]
assert acu == acu2 and acu <= acu2 and acu >= acu2
assert acu < zcu and acu <= zcu and acu != zcu
assert zcu > acu and zcu >= acu and zcu != acu