Closed antnieszka closed 7 years ago
I see you've added several new targets to travis. This leads to much longer execution time.
This time could be reduced it doctests would be called as any other test. What about creating beprof/tests/test_doctest.py file and calling the tests from there ? Then it won't be necessary to have extra tox configuration and extra travis configuration.
See for example https://docs.python.org/2/library/doctest.html#unittest-api
And run this test_doctest.py
in the same travis target as tox tests? Like:
-> execute tox
-> execute test_doctest.py
Another thing - arch linux builds fail...
warning: failed to retrieve some files
downloading python-pip-8.1.2-1-any.pkg.tar.xz...
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
Add a unittest test_doctest.py which will call doctests (see doctest unittest api). When typing tox
, pytest
will be executed. It will scan beprof\tests
for all test*py
files and execute all of them (including doctest).
@grzanka I found a probably easier solution: http://doc.pytest.org/en/latest/doctest.html
ant6% ➜ pytest --doctest-modules
Test session starts (platform: linux, Python 3.4.5, pytest 3.0.4, pytest-sugar 0.7.1)
rootdir: /home/ant6/PycharmProjects/beprof, inifile:
plugins: sugar-0.7.1, timeout-1.2.0, xdist-1.15.0, cov-2.4.0
build/lib/beprof/curve.py ✓✓✓✓✓ 10% ▉
build/lib/beprof/functions.py ✓ 12% █▎
build/lib/beprof/profile.py ✓✓ 15% █▋
build/lib/beprof/tests/test_curve.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓ 58% █████▊
build/lib/beprof/tests/test_profile.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓ 100% ██████████
Results (0.15s):
52 passed
Speaking of speed - why do we need OSX tests at all? The really slow down builds.
Some travis builds are complete:
================= 52 passed, 1 pytest-warnings in 2.47 seconds =================
Number of tests increased, I think this works... although I wish I could see the whole log.
Packaging failed:
lists of files in version control and sdist do not match!
missing from sdist:
pytest.ini
suggested MANIFEST.in rules:
include pytest.ini
Should I include this file or exclude?
i'll include pytest.ini - we will probably use pytest as a test-runner, so it may be useful.
Current coverage is 68.22% (diff: 100%)