-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from nose to unittest. #1434
Conversation
Hmm, interesting that the "unittests" tests only fail with Python<3.4 (2.7, 3.3, & pypy2 only). And the minimum requirements tests seem to have some anomaly with the Markdown TOC extension that needs investigating. I find it curious that these tests all pass with nose (the test count matches so no test discovery issues). What is nose doing differently and could these failures occur in the real world? In other words, is nose hiding some problems? |
So all of the failing tests rely on
The problem is that when Curious why these errors don't occur under nose. Is nose somehow overriding the behavior of In any event, I'm inclined to leave this for now. We can revisit the issue when one of the following happens:
|
A test refactor might also benefit from using the testfixtures lib. A bunch of helpers in that lib would simplify a bunch of our tests. |
In #1504 we introduce a tempdir decorator to use for testing (which was inspired in part by the testfitures lib mentioned in the previous comment). It makes it relatively simple to setup and tear down temp dirs and files on a test-by-test basis. Perhaps we should use temp files rather than having tests refer to the integration test files to avoid the inconsistent behavior of |
36943a9
to
5c30c30
Compare
This has been rebased against master. Many of the same problems exist, although some have been removed and others added. we are still extensively relying on |
The nose docs state: > Nose has been in maintenance mode for the past several years and will > likely cease without a new person/team to take over maintainership. > New projects should consider using Nose2, py.test, or just plain > unittest/unittest2. As we aren't really using any of nose's features, its easiest to switch to the standard lib unittest.
Now that we are PY35+ only (see #1936 & #1938), I rebased this and resolved merge conflicts. Interestingly, all tests pass without issue. However, we have a bunch of deprecation warnings (and the like) in the test output which nose apparently was hiding (see here for example). I guess it makes sense to clean them up as part of our dropping-PY27 process. |
This reverts commit 2bc6eaf.
Futureproof by avoiding a DeprecationWarning.
I cleaned up all warnings except 2 as those are directly related to which version of Markdown is installed and would require changing the minimum version supported to (3.0). We'll handle that separately. |
The nose docs state:
As we aren't really using any of nose's features, its easiest to switch
to the standard lib unittest.
Note This is currently experimental. I'm checking to see how many tests fail and if there are differences across platforms. Is it more work than its worth?