We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f207225 commit a4db3fbCopy full SHA for a4db3fb
tests/test_lazy.py
@@ -0,0 +1,20 @@
1
+#!/usr/bin/env python
2
+# -*- coding: utf-8 -*-
3
+import unittest
4
+from creational.lazy_evaluation import Person
5
+
6
7
+class TestDynamicExpanding(unittest.TestCase):
8
9
+ def setUp(self):
10
+ self.John = Person('John', 'Coder')
11
12
+ def test_innate_properties(self):
13
+ self.assertDictEqual({'name': 'John', 'occupation': 'Coder'},
14
+ self.John.__dict__)
15
16
+ def test_extended_properties(self):
17
+ print("Jhon's relatives: {0}".format(self.John.relatives))
18
+ self.assertDictEqual({'name': 'John', 'occupation': 'Coder',
19
+ 'relatives': 'Many relatives.'},
20
0 commit comments