Conversation
|
Not sure why the tests fail with Can we not stack parametrized fixtures? |
|
Stacking should work fine
…On Wed, Sep 19, 2018 at 8:13 PM, Oliver Beckstein ***@***.***> wrote:
Not sure why the tests fail with
___________ ERROR at setup of test_AnalysisFromFunction[distributed] ___________
file /home/travis/build/MDAnalysis/pmda/pmda/test/test_custom.py, line 26
def test_AnalysisFromFunction(scheduler):
file /home/travis/build/MDAnalysis/pmda/pmda/testing.py, line 26
@pytest.fixture(scope='session', params=('distributed', 'multiprocessing'))
def scheduler(request, client):
E fixture 'client' not found
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, cov, doctest_namespace, monkeypatch, no_cover, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, scheduler, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
Can we not stack parametrized fixtures?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#61 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AI0jB4r2h5gfovJXyTHiX8E6-ksa6I3mks5ucuvEgaJpZM4Wwpsp>
.
|
c0c8127 to
72375a1
Compare
|
Maybe both fixtures need to be loaded. I'm trying the conftest.py
configuration file now. Maybe that works better
On Thu, Sep 20, 2018 at 3:16 AM Richard Gowers <notifications@github.com>
wrote:
… Stacking should work fine
On Wed, Sep 19, 2018 at 8:13 PM, Oliver Beckstein <
***@***.***>
wrote:
> Not sure why the tests fail with
>
> ___________ ERROR at setup of test_AnalysisFromFunction[distributed]
___________
> file /home/travis/build/MDAnalysis/pmda/pmda/test/test_custom.py, line 26
> def test_AnalysisFromFunction(scheduler):
> file /home/travis/build/MDAnalysis/pmda/pmda/testing.py, line 26
> @pytest.fixture(scope='session', params=('distributed',
'multiprocessing'))
> def scheduler(request, client):
> E fixture 'client' not found
> > available fixtures: cache, capfd, capfdbinary, caplog, capsys,
capsysbinary, cov, doctest_namespace, monkeypatch, no_cover, pytestconfig,
record_property, record_xml_attribute, record_xml_property, recwarn,
scheduler, tmpdir, tmpdir_factory
> > use 'pytest --fixtures [testpath]' for help on them.
>
> Can we not stack parametrized fixtures?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#61 (comment)>, or
mute
> the thread
> <
https://github.com/notifications/unsubscribe-auth/AI0jB4r2h5gfovJXyTHiX8E6-ksa6I3mks5ucuvEgaJpZM4Wwpsp
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#61 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEGnVktHmJ42kuc8seU3yGjZlxF57_SWks5ucuxzgaJpZM4Wwpsp>
.
|
|
OK the fixtures work now. The tests fail because of actual bugs. |
927aeee to
1509fd0
Compare
| def _reduce(res, result_single_frame): | ||
| """ 'add' action for an accumulator""" | ||
| if res == []: | ||
| if isinstance(res, list) and len(res) == 0: |
There was a problem hiding this comment.
@VOD555 Can you have a look. Your old version triggered a deprecation warning when res is a numpy array.
Codecov Report
@@ Coverage Diff @@
## master #61 +/- ##
=======================================
Coverage 99.27% 99.27%
=======================================
Files 7 7
Lines 274 274
Branches 26 26
=======================================
Hits 272 272
Misses 1 1
Partials 1 1
Continue to review full report at Codecov.
|
This allows to add new schedulers in the future and have pytest automatically create the tests for us. The should also catch more bugs.
The comparison is deprecated is `res` is a numpy array. This is more robust.
9e83b15 to
58b1281
Compare
|
Ready for review |
orbeckst
left a comment
There was a problem hiding this comment.
lgtm
Can we now use this for other tests as well, not only for the custom analysis class?
|
@kain88-de I run the tests for I think the cause is scheduler_kwargs = {'get': scheduler.get}where we use a |
|
See #66 for a fix of the warning
…On Thu 20. Sep 2018 at 22:32, VOD555 ***@***.***> wrote:
@kain88-de <https://github.com/kain88-de> I run the tests for rdf.py,
rms.py and contacts.py, and they all returned the deprecation warning:
/home/shujie/anaconda3/envs/py36/lib/python3.6/site-packages/dask/base.py:835:
UserWarning: The get= keyword has been deprecated. Please use the
scheduler= keyword instead with the name of the desired scheduler like
'threads' or 'processes' warnings.warn("The get= keyword has been
deprecated. "
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEGnVnuxRLeazuSBJICQdLXZYhE04ERAks5uc_tYgaJpZM4Wwpsp>
.
|
This allows to add new schedulers in the future and have pytest
automatically create the tests for us. The should also catch more
bugs.
Fixes #57
Changes made in this Pull Request:
PR Checklist