Exemple #1
0
 def testClearWithSpaceArgument(self):
     space = Space("Hellow world")
     space.clear("hey there")
     self.assertEqual(space.length(), 1)
     self.assertEqual(space.get('hey'), 'there', 'Clear with a Space argument should deep copy the argument Space')
Exemple #2
0
 def testClear(self):
     space = Space('Hello world')
     self.assertEqual(space.length(), 1)
     self.assertTrue(isinstance(space.clear(), Space), 'clear returns Space so chainable')
     self.assertEqual(space.length(), 0)