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 unittest warnings #1269

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Contributor

commented May 7, 2018

Running the tests via python -m unittest shows several warnings which this commit fixes:

  • Remove use of deprecated assertEquals and assertNotEquals methods in favor of assertEqual and assertNotEqual.

  • Remove unclosed file objects in setup method and avoid relying on platform default file encoding.

Note that there are still several other warnings, but those are emitted by libraries (e.g. deprecation warnings in werkzeug).

Screenshot of unittest warnings

Fix unittest warnings
Running the tests via `python -m unittest` shows several warnings which
this commit fixes:

- Remove use of deprecated `assertEquals` and `assertNotEquals` methods
  in favor of `assertEqual` and `assertNotEqual`.

- Remove unclosed file objects in setup method and avoid relying on
  platform default file encoding.

Note that there are still several other warnings, but those are emitted
by libraries (e.g. deprecation warnings in werkzeug).

@c-w c-w force-pushed the icokpy:enhancement/c-w/remove-deprecated-test-methods branch from 325e1cf to 8944ef4 May 7, 2018

@colinschoen
Copy link
Member

left a comment

LGTM

@colinschoen colinschoen merged commit 7664639 into okpy:master May 7, 2018

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@c-w c-w deleted the icokpy:enhancement/c-w/remove-deprecated-test-methods branch May 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.