mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
use assert[Not]In where appropriate
A patch from Dave Malcolm.
This commit is contained in:
parent
a69ba65fdc
commit
577473fe68
75 changed files with 471 additions and 454 deletions
|
|
@ -160,14 +160,14 @@ class test__candidate_tempdir_list(TC):
|
|||
for envname in 'TMPDIR', 'TEMP', 'TMP':
|
||||
dirname = os.getenv(envname)
|
||||
if not dirname: raise ValueError
|
||||
self.assertTrue(dirname in cand)
|
||||
self.assertIn(dirname, cand)
|
||||
|
||||
try:
|
||||
dirname = os.getcwd()
|
||||
except (AttributeError, os.error):
|
||||
dirname = os.curdir
|
||||
|
||||
self.assertTrue(dirname in cand)
|
||||
self.assertIn(dirname, cand)
|
||||
|
||||
# Not practical to try to verify the presence of OS-specific
|
||||
# paths in this list.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue