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

Use pytest #209

Merged
merged 7 commits into from
Jan 26, 2018
Merged

Use pytest #209

merged 7 commits into from
Jan 26, 2018

Conversation

toslunar
Copy link
Member

  • Change nose to pytest
  • Move base classes _Test* of tests to files basetest_*.py, because pytest cannot ignore classes by their names, but by the filenames.

@muupan
Copy link
Member

muupan commented Jan 10, 2018

Why did coverage increase that much? > Coverage increased (+6.5%) to 79.691%

@toslunar
Copy link
Member Author

It seems nosetests didn't report the coverage by subprocess.
I'm not sure if there's other reason why the coverage increased.

Copy link
Member

@muupan muupan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for the duplicated code I mentioned.

'last_wscale': [1, 1e-3],
})
)
class TestFCSAQFunction(_TestSAQFunction):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a concrete test case, not a base test. It looks the same as TestFCSAQFunction in tests/q_functions_tests/test_state_action_q_function.py, so I think it is not necessary.

'last_wscale': [1, 1e-3],
})
)
class TestFCLSTMSAQFunction(_TestSAQFunction):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

'last_wscale': [1, 1e-3],
})
)
class TestFCBNSAQFunction(_TestSAQFunction):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

'last_wscale': [1, 1e-3],
})
)
class TestFCBNLateActionSAQFunction(_TestSAQFunction):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@toslunar
Copy link
Member Author

Thanks. Fixed.

@muupan
Copy link
Member

muupan commented Jan 26, 2018

LGTM

@muupan muupan merged commit 4ab024b into chainer:master Jan 26, 2018
@toslunar toslunar deleted the pytest branch January 26, 2018 09:43
@muupan muupan added the test label Jul 23, 2018
@muupan muupan added this to the v0.4 milestone Jul 23, 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.

2 participants