コード例 #1
0
 def test_run_coverage(self):
     """Run green tests with coverage."""
     cmd = GreenTestCommand(Distribution())
     cmd.coverage = True
     cmd.ensure_finalized()
     cmd.run()
     self.assertThat(_subprocess_call_args(), Contains("-r"))
コード例 #2
0
 def test_invalid_target_option(self):  # suppress(no-self-use)
     """Invalidly formed target option throws."""
     with ExpectedException(DistutilsArgError):
         cmd = GreenTestCommand(Distribution())
         cmd.target = True
         cmd.ensure_finalized()
         cmd.run()
コード例 #3
0
 def test_run_quiet(self):
     """Run green tests quietly."""
     cmd = GreenTestCommand(Distribution())
     cmd.quiet = True
     cmd.ensure_finalized()
     cmd.run()
     self.assertThat(green.cmdline.sys.argv, Not(Contains("-vvv")))
コード例 #4
0
 def test_run_target(self):
     """Run green tests against a predetermined target."""
     cmd = GreenTestCommand(Distribution())
     cmd.target = "test"
     cmd.ensure_finalized()
     cmd.run()
     self.assertThat(_subprocess_call_args(),
                     Contains("test"))
コード例 #5
0
 def test_run_concurrently(self):
     """Run green tests concurrently."""
     cmd = GreenTestCommand(Distribution())
     cmd.concurrent = True
     cmd.ensure_finalized()
     cmd.run()
     self.assertThat(_subprocess_call_args(),
                     ContainsAll(["-s", "0"]))
コード例 #6
0
 def test_run_quiet(self):
     """Run green tests quietly."""
     cmd = GreenTestCommand(Distribution())
     cmd.quiet = True
     cmd.ensure_finalized()
     cmd.run()
     self.assertThat(_subprocess_call_args(),
                     Not(Contains("-vvv")))
コード例 #7
0
 def test_run_coverage_omit(self):
     """Run green tests against a predetermined target."""
     cmd = GreenTestCommand(Distribution())
     cmd.coverage_omit = "abc/*,*/def"
     cmd.ensure_finalized()
     cmd.run()
     self.assertThat(_subprocess_call_args(),
                     ContainsAll([
                         "-o",
                         cmd.coverage_omit
                     ]))