Closed mbrukman closed 2 years ago
All tests are passing! However, we're still running the tests using nosetests
— I wanted to change as little as possible, to make sure everything is still working.
Now, we can remove our dependency on nose
and run tests via python -m unittest
unstead of nosetests
and get the same functionality. Hopefully, it'll be even slightly faster overall due to having to install fewer packages!
Looks like all tests are "passing", but Python 2 isn't actually running tests. Maybe it needs python -m unittest discover
rather than simply python -m unittest
which seems to work in Python 3?
Our tests are now faster (this is Python 3.7 on Ubuntu 20.04, sample size of 1, so usual caveats):
nosetests
: "Ran 10 tests in 0.742s"unittest
: "Ran 10 tests in 0.008s"And now, python -m unittest discover
works in Python 2 and Python 3, and dropping the nose
dependency lets us enable running on Python 3.10 as well with no changes!
Success! 🎉
This lets us drop the dependency on the deprecated
nose
library and use the Python standard libraryunittest
. Since we don't use any advanced functionality, and theunittest
library is sufficient for our use cases, this means we can remove the dependency onnose
without introducing a new dependency on eithernose2
orpytest
.Closes https://github.com/rossant/ipycache/issues/61