示例#1
0
 def test_get_filter(self):
     p = Pump("data/building_def.json")
     p.out_filename = "data/buildings_filtered.txt"
     n_rows = p.get()
     self.assertEqual(2, n_rows)
示例#2
0
 def test_no_update_file(self):
     p = Pump()
     p.out_filename = 'data/no_update_file.txt'
     with self.assertRaises(IOError):
         p.update()
示例#3
0
 def test_pump_update(self):
     p = Pump("data/building_def.json")
     p.out_filename = "data/pump_data.txt"
     [add, sub] = p.update()
     self.assertEqual(2, len(add))
     self.assertEqual(2, len(sub))