Skip to content

Commit

Permalink
[tests] readme instructions and configured in setup.py (splintered-re…
Browse files Browse the repository at this point in the history
  • Loading branch information
stonier authored Mar 7, 2019
1 parent 93715c3 commit ee93e18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"visualisation, logging and various tutorials."
),
license='BSD',
# test_suite = 'nose.collector',
test_suite='tests',
# tests_require=['nose', 'pytest', 'flake8', 'yanc', 'nose-htmloutput']
# tests_require=['pytest'],
entry_points={
Expand Down
20 changes: 7 additions & 13 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# Tests

Make sure you source the virutal environment in all cases to run
tests in this way (if you are using a colcon environment, the
same commands will eventually hold once ros2's rosdep becomes
functional).
Make sure you source the environment to run tests.

## Executing Tests

Always run tests from the root directory, since that is where
it will pick up the nosetests configuration in `setup.cfg`.

```
# All Tests via SetupTools (indirectly)
$ python3 setup.py nosetests
# All Tests via Nosetest (directly)
$ nosetests ./tests
# A single test
$ nosetests tests/test_oneshot.py
# run all tests will full stdout
$ python3 -m unittest discover
# run a single test
$ cd tests && python3 ./test_exchange.py
# step back and run from setup.py (what colcon does)
$ python3 setup.py test
```

0 comments on commit ee93e18

Please sign in to comment.