[MRG] Remove nose dependency completely from project.#441
[MRG] Remove nose dependency completely from project.#441lesteve merged 8 commits intojoblib:masterfrom
Conversation
6002dc2 to
78b6e4d
Compare
|
@lesteve @GaelVaroquaux Please have a round of review, I'm ready to make amendments if any... |
lesteve
left a comment
There was a problem hiding this comment.
Changes look good apart from the minor comments. The error on Travis is weird and consistent, it looks like the process was killed with a kill -9 ...
doc/sphinxext/numpydoc/numpydoc.py
Outdated
| def setup(app, get_doc_object_=get_doc_object): | ||
| if not hasattr(app, 'add_config_value'): | ||
| return # probably called by nose, better bail out | ||
| return |
There was a problem hiding this comment.
Do not change anything in doc/sphintext/numpydoc, this is a straight copy from numpydoc.
Does it cause any problem?
There was a problem hiding this comment.
Nope it doesn't. I'll restore it back.
joblib/test/test_hashing.py
Outdated
|
|
||
| def __init__(self): | ||
| mem = Memory(cachedir=test_memory_env['dir']) | ||
| def __init__(self, tmpdir_path): |
There was a problem hiding this comment.
Just curious, do you need tmpdir_path in the __init__ arguments, i.e. could you not just have mem = Memory(cachedir=tmpdir_path)?
There was a problem hiding this comment.
Nope, tmpdir_path used that way would take in the global reference - the function itself. Pytest actually executes these functions marked with @fixture before test execution and automatically provides them as function arguments whenever specified. So this tmpdir_path will be passed in constructor from inside a test method.
There was a problem hiding this comment.
Fair enough, although a little bit magical. We'll get used to it after some time.
OK it passes this time. This flakiness with the tests that happens on Travis/AppVeyor is really weird, it is probably just a coincidence that this happens while moving towards py.test. |
|
@lesteve Even I haven't found any specific line to blame, I'm just optimistic about the fact that once I parametrize |
|
Although I should mention that such flakiness has never happened locally on my machine... strange. |
doc/sphinxext/numpydoc/numpydoc.py
Outdated
| def setup(app, get_doc_object_=get_doc_object): | ||
| if not hasattr(app, 'add_config_value'): | ||
| return # probably called by nose, better bail out | ||
| return # probably called by nose, better bail out |
There was a problem hiding this comment.
Look at your diff ;-). I'll edit it inline quicker this way
| def __init__(self): | ||
| mem = Memory(cachedir=test_memory_env['dir']) | ||
| def __init__(self, cachedir): | ||
| mem = Memory(cachedir=cachedir) |
There was a problem hiding this comment.
I changed the parameter name from tmpdir_path to cachedir. Less chance for confusion this way.
|
LGTM, merging thanks a lot! |
|
Well... that was quick, I wanted this to happen! Now the subsequent steps will be painless, cheers ! 🎉 |
* commit '0.10.2-55-g660fe5d': (52 commits) MAINT simplify way to skip doctests Do not print frames with IPython internals in format_stack BF(TST): compare for version in pickled filename ignoring full path, and looking for _ as well (joblib#445) [MRG] Remove nose dependency completely. (joblib#441) MAINT add Python 3.5 in setup.py Remove some Python 2.6 specific code [MRG] Make test execution on CI possible through py.test command. (joblib#433) Remove more python 2.6 related code (joblib#440) [MRG] Use commit range for diff in flake8_diff.sh (joblib#439) MAINT remove support for python 2.6 (joblib#437) Improve doc about caching methods (joblib#432) Get the tests passing with py.test MAINT update flake8_diff.sh COSMIT move stdlib imports where they belong [MRG] Replace assert_* methods with "assert" keyword statements. (joblib#430) Reraise when the exception is not a TransportableException (joblib#429) Make sure LICENSE.txt is included in the wheel Add LICENSE.txt Update doc/paralle.rst [MRG+1] Remove all nose imports from test scripts. (joblib#422) ...
* releases: (52 commits) MAINT simplify way to skip doctests Do not print frames with IPython internals in format_stack BF(TST): compare for version in pickled filename ignoring full path, and looking for _ as well (joblib#445) [MRG] Remove nose dependency completely. (joblib#441) MAINT add Python 3.5 in setup.py Remove some Python 2.6 specific code [MRG] Make test execution on CI possible through py.test command. (joblib#433) Remove more python 2.6 related code (joblib#440) [MRG] Use commit range for diff in flake8_diff.sh (joblib#439) MAINT remove support for python 2.6 (joblib#437) Improve doc about caching methods (joblib#432) Get the tests passing with py.test MAINT update flake8_diff.sh COSMIT move stdlib imports where they belong [MRG] Replace assert_* methods with "assert" keyword statements. (joblib#430) Reraise when the exception is not a TransportableException (joblib#429) Make sure LICENSE.txt is included in the wheel Add LICENSE.txt Update doc/paralle.rst [MRG+1] Remove all nose imports from test scripts. (joblib#422) ...
Checkpoint PR on #411 ( Succeeds PR #433 )
With this PR joblib finally drops
noseas its own dependency.with_setupmechanism ofnosetestswith equivalentskipifmarkers of pytest.NOTE: I have changed the mechanism of conditional setup of tests (based on availability of multiprocessing / shared memory) in test_hashing.py - that is, through a fixture mechanism. It is the "pytest design technique" and although one needs to specify same argument (as I have specified
tmpdir_path) to many tests, looking at a specific method signature one can easily know that this test "requires" something prior its execution...Further Roadmap:
yieldbased methods will be parametrized and overall revamping would be performed one by one to migrate from nose and adopt pytest's flavor.