Exemplo n.º 1
0
    def test_run(self, log_mock):
        u = OverallsUploader()
        args = u.parser.parse_args([])
        collector = StaticCollector(mk_coverage_results())
        uploader = CoverallsIoUploader()
        upload_calls = []

        u.parser.parse_args = lambda: args
        u.create_uploader = lambda args: uploader
        u.create_collector = lambda args: collector
        uploader.upload = upload_calls.append
        u.run()

        self.assertEqual(upload_calls, [collector.results()])
        log_mock.assert_not_called()
Exemplo n.º 2
0
 def test_results(self):
     c1 = StaticCollector(mk_coverage_results())
     c2 = StaticCollector(mk_coverage_results())
     c = CollectorSet([c1, c2])
     r = c.results()
     self.assertEqual(r.files, c1.results().files + c2.results().files)
Exemplo n.º 3
0
 def test_results(self):
     r = CoverageResults()
     c = StaticCollector(r)
     self.assertEqual(c.results(), r)