Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch to pytest and add optional Python 3.8 test#380

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

murrayrm
Copy link
Member

This PR switches the unit testing to usepytest for Travis CI instead of the deprecatedsetup.py test. It also adds an optional test for Python 3.8.

@coveralls
Copy link

coveralls commentedMar 18, 2020
edited
Loading

Coverage Status

Coverage increased (+0.02%) to 84.615% when pullingaed449d on murrayrm:setup-test-deprecated into874d52e on python-control:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 84.599% when pulling74e15b6 on murrayrm:setup-test-deprecated into874d52e on python-control:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 84.599% when pulling74e15b6 on murrayrm:setup-test-deprecated into874d52e on python-control:master.

@murrayrm
Copy link
MemberAuthor

For some reason theallow_failures tests are not being run. This was working when they were originally generated (several months back). Did something change in Travis CI?

Without theallow_failures functionality, the Python 3.8 test does not get run at all.

@murrayrm
Copy link
MemberAuthor

Rebased changes on top of master to get some of the fixes from#366 the eased precision on some of the tests.

@murrayrmmurrayrm added this to the0.8.4 milestoneMar 21, 2020
@@ -118,7 +130,7 @@ install:
# command to run tests
script:
- 'if [ $SLYCOT != "" ]; then python -c "import slycot"; fi'
- coverage runsetup.py test
- coverage run-m pytest --disable-warnings control/tests
Copy link
Contributor

Choose a reason for hiding this comment

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

is--disable-warnings needed? I would rather have them printed and give every contributor the opportunity to fix problems early before e.g.DeprecationWarnings turn into errors after a Python or some library update.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

There are 18,209 warning messages and unfortunately pytest prints error messages first => I found it hard to locate the errors. Most of the warnings seem to be around the use ofnumpy.matrix, which I figure we will get rid of starting in v0.9.0.

Comment on lines 238 to 242
def suite():
return unittest.TestLoader().loadTestsFromTestCase(TestTimeresp)
return unittest.TestLoader().loadTestsFromTestCase(TestFreqresp)

if __name__ == '__main__':
unittest.main()
Copy link
Contributor

Choose a reason for hiding this comment

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

This is code from the unittest framework. Pytest does not use it. IMHO, let's removesuite() and the__main__ sections from all test files.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I have removed thesuite() functions, which were often not properly set up and were only used intests/run_all.py, which I don't think we were using anyway.

I left in the__main__ sections, so that you could (if you wanted) call a test script directly (rather than having to usepytest).

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@bnavigatorbnavigatorbnavigator left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.8.4
Development

Successfully merging this pull request may close these issues.

3 participants
@murrayrm@coveralls@bnavigator

[8]ページ先頭

©2009-2025 Movatter.jp