mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Added another test, commented out one that doesn't apply anymore.
This commit is contained in:
parent
5b622adec6
commit
1a7333aef0
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user