takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
882 stars 119 forks source link

Use tox+pytest to execute the tests, map to the CI systems #165

Closed adferrand closed 5 years ago

adferrand commented 5 years ago

Note: this PR should be merged only after #164, as it includes its changes (everything up to ca76f3c included).

Nose seems to be outdated and not maintained anymore. It is advised on their website to use another test framework. Furthermore I had some difficulties to make nose run correctly tests.

Pytest is the de facto standard test framework in Python. Tox is the widely used tool to prepare test environment for pytest. Both of them are unlikely to be dropped.

This PR implements pytest+tox to be used in the CI systems AppVeyor and Travis. Doing so the test environment is configured in a common location for both Windows and Linux (tox.ini). Additionally to the test environment run by default, a notnetwork is settled to execute tests on a machine without network: it takes advantage of the pytest marker mechanism, by adding the decorator @pytest.mark.network on tests that requires a functional network.

Regards, Adrien Ferrand

adferrand commented 5 years ago

Berserk refactor mode triggered:

takluyver commented 5 years ago

Thanks!

I'm probably going to reintroduce testpath as a dependency and get rid of the equivalent functions in utils - testpath is another package I wrote, so I have a high degree of trust in it, and I think some of its other functions might be useful for further testing.

takluyver commented 5 years ago

I redid the merge manually to clean up the commit history a bit - I meant to squash it on Github, but I forgot when I clicked the button. New merge commit is 8e1a937aef4f9463cac04f9280e2755eb24d45e0.