def test_check_bear_results_3(self):
        start = SourcePosition('a.py', line=368, column=4)
        end = SourcePosition('a.py', line=442, column=2)
        range_object = SourceRange(start, end)
        results = [Result(affected_code=[range_object],
                          message='green_mode', origin=QuickstartBear)]

        start = SourcePosition('a.py', line=468, column=4)
        end = SourcePosition('a.py', line=478, column=2)
        ignore_object = SourceRange(start, end)
        ignore_ranges = [('+=', ignore_object)]
        self.assertFalse(check_bear_results(results, ignore_ranges))
Exemplo n.º 2
0
    def test_check_bear_results_3(self):
        start = SourcePosition('a.py', line=368, column=4)
        end = SourcePosition('a.py', line=442, column=2)
        range_object = SourceRange(start, end)
        results = [
            Result(affected_code=[range_object],
                   message='green_mode',
                   origin=QuickstartBear)
        ]

        start = SourcePosition('a.py', line=468, column=4)
        end = SourcePosition('a.py', line=478, column=2)
        ignore_object = SourceRange(start, end)
        ignore_ranges = [('+=', ignore_object)]
        self.assertFalse(check_bear_results(results, ignore_ranges))
 def test_check_bear_results_1(self):
     self.assertEqual(True, check_bear_results([], []))
     self.assertEqual(False, check_bear_results(['a'], []))
Exemplo n.º 4
0
 def test_check_bear_results_1(self):
     self.assertEqual(True, check_bear_results([], []))
     self.assertEqual(False, check_bear_results(['a'], []))