def test_display_non_verbose(self, stdout): locs = NumberedPoints(['Home', '52.168;0.040'], config_locations={'Home': (52.015, -0.221)}) locs.format = 'locator' locs.verbose = False locs.display('extsquare') expect(stdout.getvalue()) == 'IO92va33\nJO02ae40\n'
def test_display_non_verbose(self, capsys): locs = NumberedPoints(['Home', '52.168;0.040'], config_locations={'Home': (52.015, -0.221)}) locs.format = 'locator' locs.verbose = False locs.display('extsquare') assert capsys.readouterr()[0] == 'IO92va33\nJO02ae40\n'
def test_destination_locator(self, stdout): locations = NumberedPoints(['52.015;-0.221', '52.168;0.040']) locations.format = 'locator' locations.destination(42, 240, 'subsquare') expect(stdout.getvalue()) == ( 'Destination from location 1 is IO91ot\n' 'Destination from location 2 is IO91sx\n' )
def test_destination_locator(self, capsys): locations = NumberedPoints(['52.015;-0.221', '52.168;0.040']) locations.format = 'locator' locations.destination(42, 240, 'subsquare') assert capsys.readouterr()[0] == ( 'Destination from location 1 is IO91ot\n' 'Destination from location 2 is IO91sx\n' )
def test_display_locator(self, stdout): locs = NumberedPoints(['Home', '52.168;0.040'], config_locations={'Home': (52.015, -0.221)}) locs.format = 'locator' locs.display('extsquare') expect(stdout.getvalue()) == ( 'Location Home is IO92va33\n' 'Location 2 is JO02ae40\n' )
def test_display_locator(self, capsys): locs = NumberedPoints(['Home', '52.168;0.040'], config_locations={'Home': (52.015, -0.221)}) locs.format = 'locator' locs.display('extsquare') assert capsys.readouterr()[0] == ( 'Location Home is IO92va33\n' 'Location 2 is JO02ae40\n' )
def test_destination_locator_non_verbose(self, stdout): locations = NumberedPoints(['52.015;-0.221', '52.168;0.040']) locations.format = 'locator' locations.verbose = False locations.destination(42, 240, 'extsquare') expect(stdout.getvalue()) == 'IO91ot97\nIO91sx14\n'
def test_destination_locator_non_verbose(self, capsys): locations = NumberedPoints(['52.015;-0.221', '52.168;0.040']) locations.format = 'locator' locations.verbose = False locations.destination(42, 240, 'extsquare') assert capsys.readouterr()[0] == 'IO91ot97\nIO91sx14\n'