Ordering tests using trial twisted

113 views Asked by At

We are thinking of using trial from twisted for our testing. Looking at the documentation, there does not seem to be a way to order the tests specifically, it follows its own based on names. Is there any way to order the tests without using naming conventions?

1

There are 1 answers

0
notorious.no On

One can only order alphabetically or "toptobottom" (which executes your tests in the order they're in the code) using trial --order. So if you wanted to execute the tests based on the order they're written in your code, then you'd execute something similar to:

trial --order=toptobottom myunittests.py

This is the extent of trial's ordering functionality though. You may be able to use py.test for some other kinds of ordering, but I have now clue how to do that.