Added another test, commented out one that doesn't apply anymore.

This commit is contained in:
Jeremy Fincher 2004-12-19 01:09:42 +00:00
parent 5b622adec6
commit 1a7333aef0

View File

@ -112,9 +112,16 @@ class TestDynamic(SupyTestCase):
self.assertEqual(dynamic.i, 2) self.assertEqual(dynamic.i, 2)
self.assertEqual(dynamic.y, z) self.assertEqual(dynamic.y, z)
self.assertEqual(dynamic.x, z) self.assertEqual(dynamic.x, z)
self.assertRaises(NameError, getattr, dynamic, 'asdfqwerqewr') #self.assertRaises(NameError, getattr, dynamic, 'asdfqwerqewr')
self.assertEqual(dynamic.self, self) self.assertEqual(dynamic.self, self)
return z return z
self.assertEqual(f(10), 10) self.assertEqual(f(10), 10)
def testCommonUsage(self):
foo = 'bar'
def f():
foo = dynamic.foo
self.assertEqual(foo, 'bar')
f()
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: