syncing master
This commit is contained in:
@@ -67,10 +67,12 @@ class PanelPresenterTest(unittest.TestCase):
|
||||
def test_get_buildings_data(self):
|
||||
self.subject = ProjectPresenter(SystemType.singleTilt, ModuleType.Cell96)
|
||||
buildings = [ [ Coordinate(-60,-60), Coordinate(60,-60), Coordinate(60,60), Coordinate(-60,60) ] ] # big square
|
||||
expected_buildings = [[ {'x': -60, '_Coordinate__rounded_x': -60, 'y': 60, '_Coordinate__rounded_y': -60, 'rotation': 0.0},
|
||||
{'x': 60, '_Coordinate__rounded_x': 60, 'y': 60, '_Coordinate__rounded_y': -60, 'rotation': 0.0},
|
||||
{'x': 60, '_Coordinate__rounded_x': 60, 'y': -60, '_Coordinate__rounded_y': 60, 'rotation': 0.0},
|
||||
{'x': -60, '_Coordinate__rounded_x': -60, 'y': -60, '_Coordinate__rounded_y': 60, 'rotation': 0.0}]]
|
||||
expected_buildings = [[
|
||||
{'x': -60, '_Coordinate__rounded_x': -60, 'y': -60, '_Coordinate__rounded_y': -60, 'rotation': 0.0},
|
||||
{'x': 60, '_Coordinate__rounded_x': 60, 'y': -60, '_Coordinate__rounded_y': -60, 'rotation': 0.0},
|
||||
{'x': 60, '_Coordinate__rounded_x': 60, 'y': 60, '_Coordinate__rounded_y': 60, 'rotation': 0.0},
|
||||
{'x': -60, '_Coordinate__rounded_x': -60, 'y': 60, '_Coordinate__rounded_y': 60, 'rotation': 0.0}
|
||||
]]
|
||||
actual_buildings = self.subject.get_buildings(buildings)
|
||||
assert_array_equal(actual_buildings,expected_buildings)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user