diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-10 08:42:31 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-10 08:42:31 -0400 |
| commit | 52e07c90b77b1d07ed95a6195ec5d895f0988224 (patch) | |
| tree | 325346a20aedac88b3297919f5c1c89f79de7aed /test/test_testing.py | |
| parent | d4dd809d27ad7f31431a4ef61309b6951ad41d9b (diff) | |
| parent | 822b7c82f58bbd6f2b38cc98c7881cc405d0c69e (diff) | |
| download | python-coveragepy-52e07c90b77b1d07ed95a6195ec5d895f0988224.tar.gz | |
Merge Brett's __main__.py file for the tree.
Diffstat (limited to 'test/test_testing.py')
| -rw-r--r-- | test/test_testing.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_testing.py b/test/test_testing.py index 2461a08..bcf7d28 100644 --- a/test/test_testing.py +++ b/test/test_testing.py @@ -121,3 +121,12 @@ class CoverageTestTest(CoverageTest): self.assertEqual(self.file_text("dos.txt"), "Hello\r\n") self.make_file("mac.txt", "Hello\n", newline="\r") self.assertEqual(self.file_text("mac.txt"), "Hello\r") + + def test_file_exists(self): + self.make_file("whoville.txt", "We are here!") + self.assert_exists("whoville.txt") + self.assert_doesnt_exist("shadow.txt") + self.assertRaises(AssertionError, self.assert_doesnt_exist, + "whoville.txt") + self.assertRaises(AssertionError, self.assert_exists, "shadow.txt") + |
