Skip to content

Commit 4b4d660

Browse files
Use assertNotHasAttr
1 parent 1ab2939 commit 4b4d660

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_code_module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_ps1(self):
4747
self.console.interact()
4848
output = ''.join(''.join(call[1]) for call in self.stdout.method_calls)
4949
self.assertIn('>>> ', output)
50-
self.assertFalse(hasattr(self.sysmod, 'ps1'))
50+
self.assertNotHasAttr(self.sysmod, 'ps1')
5151

5252
self.infunc.side_effect = [
5353
"import code",
@@ -69,7 +69,7 @@ def test_ps2(self):
6969
self.console.interact()
7070
output = ''.join(''.join(call[1]) for call in self.stdout.method_calls)
7171
self.assertIn('... ', output)
72-
self.assertFalse(hasattr(self.sysmod, 'ps2'))
72+
self.assertNotHasAttr(self.sysmod, 'ps2')
7373

7474
self.infunc.side_effect = [
7575
"import code",

0 commit comments

Comments
 (0)