diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 15:40:09 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 15:40:09 (GMT) |
commit | b58e0bd8bb7592dd48b30af546fc20f52ac625bd (patch) | |
tree | 2af0b7f4177890e1781f8d38aed8ebdc44c71f39 /Lib/test/test_site.py | |
parent | 0f77f465ff7f5e39bbf701b575aebf75dd8d800d (diff) | |
download | cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.zip cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.tar.gz cpython-b58e0bd8bb7592dd48b30af546fc20f52ac625bd.tar.bz2 |
use assert[Not]In where appropriate
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r-- | Lib/test/test_site.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index f785319..0fde46a 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -63,14 +63,14 @@ class HelperFunctionsTests(unittest.TestCase): dir_set = site._init_pathinfo() for entry in [site.makepath(path)[1] for path in sys.path if path and os.path.isdir(path)]: - self.assertTrue(entry in dir_set, - "%s from sys.path not found in set returned " - "by _init_pathinfo(): %s" % (entry, dir_set)) + self.assertIn(entry, dir_set, + "%s from sys.path not found in set returned " + "by _init_pathinfo(): %s" % (entry, dir_set)) def pth_file_tests(self, pth_file): """Contain common code for testing results of reading a .pth file""" - self.assertTrue(pth_file.imported in sys.modules, - "%s not in sys.modules" % pth_file.imported) + self.assertIn(pth_file.imported, sys.modules, + "%s not in sys.modules" % pth_file.imported) self.assertIn(site.makepath(pth_file.good_dir_path)[0], sys.path) self.assertFalse(os.path.exists(pth_file.bad_dir_path)) |