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"))
 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()
 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")))
 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"))
 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"]))
 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")))
 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
                     ]))