GlobalFishingWatch / gpsdio

AIS I/O with Python, dictionaries, and the GPSd AIVDM schema.
Other
6 stars 3 forks source link

nosetest with executable tests #147

Closed schwehr closed 9 years ago

schwehr commented 9 years ago

This is in the "I can't remember where this came up" category.

I remember someone telling me that nose rejects tests that are marked executable, which makes it annoying if want people to be able to just run a test file by specifying it on the command line. I believe this will fix it.

Add this to setup.cfg:

[nosetests]
exe=True
geowurster commented 9 years ago

@schwehr Thanks for the recommendation, but we're using py.test, because it gives better failure messages and has fixtures, which nose can't emulate, so we can't support both.

To run a single test file: py.test tests/test_base.py

To run a single test function: py.test tests/test_base.py::test_wrong_mode

schwehr commented 9 years ago

Ok. Thanks. Updated https://github.com/schwehr/libais/issues/113