コード例 #1
0
ファイル: test_edist.py プロジェクト: encukou/upoints
 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'
コード例 #2
0
ファイル: test_edist.py プロジェクト: JNRowe/upoints
 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'
コード例 #3
0
ファイル: test_edist.py プロジェクト: encukou/upoints
 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'
     )
コード例 #4
0
ファイル: test_edist.py プロジェクト: JNRowe/upoints
 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'
     )
コード例 #5
0
ファイル: test_edist.py プロジェクト: encukou/upoints
 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'
     )
コード例 #6
0
ファイル: test_edist.py プロジェクト: JNRowe/upoints
 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'
     )
コード例 #7
0
ファイル: test_edist.py プロジェクト: encukou/upoints
 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'
コード例 #8
0
ファイル: test_edist.py プロジェクト: JNRowe/upoints
 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'