How to run only one file of tests

Asked by Aaron Whitehouse

Sorry if this is a stupid question, but I'm struggling to figure out how to run a single file of tests and I'm not familiar with tox etc.

I see that if I run run-tests, it invokes tox to do all sorts of fancy things and then run all the tests in the project with multiple Python versions. I've created a new file of tests in functional/test_verify.py - is it possible for me to use the tox configuration etc but run only these tests?

Question information

Language:
English Edit question
Status:
Expired
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#1

It looks like:
$python setup.py test -s testing.functional.test_verify
works, but please let me know if there is a better way that I should be doing this.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) said :
#3

As I've now detailed in README-REPO (and as of http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-series/revision/1113 ):
"
You can run specific tests using:
tox -- -s [folder].[folder].[file].[class].[test]
For example:
tox -- -s testing.unit.test_selection
or:
tox -- -s testing.unit.test_selection.MatchingTest.test_tuple_include
"

The advantage in this over the method above is that it will run the test/tests against all environments (e.g. all relevant python versions).