Ticket #5787: trial-order.2.patch

File trial-order.2.patch, 2.0 KB (added by Julian Berman, 8 years ago)
  • doc/core/man/trial.1

    diff --git a/doc/core/man/trial.1 b/doc/core/man/trial.1
    index 00c491c..bfb6f85 100644
    a b it look like the modules are not present in the system, causing tests to check 
    203203the behavior for that configuration.
    204204.TP
    205205\fB-z\fR, \fB--random\fR \fIseed\fR
    206 Run the tests in random order using the specified seed.
     206Run the tests in random order using the specified seed. Don't pass this option
     207if you also are passing --order.
    207208.PP
    208209.SH SEE ALSO
    209210The latest version of the trial documentation can be found at
  • twisted/scripts/trial.py

    diff --git a/twisted/scripts/trial.py b/twisted/scripts/trial.py
    index 7cc7ebc..5e02e30 100644
    a b class Options(_BasicOptions, usage.Options, app.ReactorSelectionMixin): 
    466466                raise usage.UsageError("You must specify --debug when using "
    467467                                       "--nopm ")
    468468            failure.DO_POST_MORTEM = False
    469         if self['order'] and self['random']:
    470             raise usage.UsageError(
    471                 "You can't specify --random when using --order")
    472469
    473470
    474471
  • twisted/trial/test/test_script.py

    diff --git a/twisted/trial/test/test_script.py b/twisted/trial/test/test_script.py
    index fa7b788..524f376 100644
    a b class OptionsTestCase(unittest.TestCase): 
    480480        self.assertEqual(["--recursionlimit", "2000"], args)
    481481
    482482
    483     def test_randomConflictsWithOrder(self):
    484         """
    485         C{parseOptions} raises a C{UsageError} when C{--random} is passed along
    486         C{--order}.
    487         """
    488         opts = ["--random", "4", "--order", "alphabetical"]
    489         error = self.assertRaises(UsageError, self.options.parseOptions, opts)
    490         self.assertEqual("You can't specify --random when using --order",
    491                          str(error))
    492 
    493 
    494483    def test_jobsConflictWithDebug(self):
    495484        """
    496485        C{parseOptions} raises a C{UsageError} when C{--debug} is passed along