Skip to content
Prev Previous commit
Next Next commit
Checks a value after deletion.
  • Loading branch information
lisroach committed Jun 7, 2017
commit b22b9453cfbef43b5e7717bbd2a06b784182bd3a
2 changes: 2 additions & 0 deletions Lib/test/test_funcattrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def f(): return a
self.fail("shouldn't be able to read an empty cell")
with self.assertRaises(NameError):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also check a directly.

f()
with self.assertRaises(UnboundLocalError):
print(a)

def test___name__(self):
self.assertEqual(self.b.__name__, 'b')
Expand Down