Open nicolargo opened 6 months ago
Improve tests by testing all the plugin/model.py methods done in Glances 4.0.0
./venv/bin/pip install pytest
ln -s unittest-core.py test_core.py
./venv/bin/pytest
..................................... [100%]
37 passed in 20.43s
Also work with other unitest file:
ln -s unittest-restful.py test_restful.py
ln -s unittest-xmlrpc.py test_xmlrpc.py
./venv/bin/pytest
...................................................................... [100%]
70 passed in 31.61s
Example:
cat /home/nhe/dev/glances/glances/timer_test.py
from .timer import Timer
def test_timer():
t = Timer(5)
assert t is not None
./venv/bin/pytest
. [100%]
1 passed in 0.09s
This issue is stale because it has been open for 3 months with no activity.
For PyTest migration (have a look to https://github.com/giampaolo/psutil/commit/42c7a241c1caf8d723dc360422db937d6036b40f)