コード例 #1
0
ファイル: test_utils.py プロジェクト: matchtools/matchtools
    def test_match_rows_pass_4(self):
        MatchBlock.number_tolerance = 0
        MatchBlock.date_tolerance = 0
        MatchBlock.coordinates_tolerance = 650
        MatchBlock.string_tolerance = 0
        MatchBlock.str_number_tolerance = 0
        MatchBlock.str_custom_tolerance = 0

        row1 = ['Flight 1', 100, '55.75222, 37.61556', '10-Dec-2015']
        row2 = ['Flight 1', 100, '59.93863, 30.31413', '10-Dec-2015']

        self.assertIs(match_rows(row1, row2), True)
コード例 #2
0
ファイル: test_utils.py プロジェクト: matchtools/matchtools
    def test_match_rows_pass_3(self):
        MatchBlock.number_tolerance = 10
        MatchBlock.date_tolerance = 0
        MatchBlock.coordinates_tolerance = 0
        MatchBlock.string_tolerance = 0
        MatchBlock.str_number_tolerance = 0
        MatchBlock.str_custom_tolerance = 0

        row1 = ['Flight 1', 100, '41.49008, -71.312796', '10-Dec-2015']
        row2 = ['Flight 1', 90, '41.49008, -71.312796', '10-Dec-2015']

        self.assertIs(match_rows(row1, row2), True)
コード例 #3
0
ファイル: test_utils.py プロジェクト: matchtools/matchtools
    def test_match_rows_pass_1(self):
        row1 = ['Flight 1', 100, '41.49008, -71.312796', '10-Dec-2015']
        row2 = ['Flight 1', 100, '41.49008, -71.312796', '10-Dec-2015']

        self.assertIs(match_rows(row1, row2), True)
コード例 #4
0
ファイル: test_utils.py プロジェクト: matchtools/matchtools
    def test_match_rows_fail_2(self):
        row1 = ['Flight 1', 100, '41.49008, -71.312796', '10-Dec-2015']
        row2 = ['Flight 1', 100, '41.49008, -71.312796']

        self.assertIs(match_rows(row1, row2), False)