Skip to content
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

Fix importing errors in unit tests #178

Merged
merged 1 commit into from
Jan 25, 2018
Merged

Conversation

keisukefukuda
Copy link
Member

Some tests lack import chainer.testing, so the produce the following error when invoked alone by pytest.

./tests/chainermn_tests/functions_tests/test_point_to_point_communication.py
============================= test session starts ==============================
platform linux -- Python 3.6.0, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 -- /home/kfukuda/.pyenv/versions/anaconda3-4.3.1/bin/python
cachedir: .cache
rootdir: /home/kfukuda/chainermn, inifile:
collecting ... collected 0 items / 1 errors

==================================== ERRORS ====================================
 ERROR collecting tests/chainermn_tests/functions_tests/test_point_to_point_communication.py
tests/chainermn_tests/functions_tests/test_point_to_point_communication.py:170: in <module>
    @chainer.testing.attr.gpu
E   AttributeError: module 'chainer' has no attribute 'testing'
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 1.42 seconds ============================

This PR fixes these issues simply by adding import chainer.testing .

@keisukefukuda keisukefukuda requested a review from shu65 December 26, 2017 06:55
@shu65 shu65 self-assigned this Dec 26, 2017
@keisukefukuda keisukefukuda changed the title [WIP] Fix importing errors in unit tests Fix importing errors in unit tests Dec 27, 2017
@kuenishi kuenishi added this to the 1.2.0 milestone Jan 11, 2018
@shu65 shu65 merged commit 70488de into master Jan 25, 2018
@shu65 shu65 deleted the fix-unit-test-importing-errors branch January 25, 2018 03:15
@iwiwi iwiwi added the test label Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants