Skip to content

Fix unittest warnings#1269

Merged
colinschoen merged 1 commit intookpy:masterfrom
icokpy:enhancement/c-w/remove-deprecated-test-methods
May 7, 2018
Merged

Fix unittest warnings#1269
colinschoen merged 1 commit intookpy:masterfrom
icokpy:enhancement/c-w/remove-deprecated-test-methods

Conversation

@c-w
Copy link
Contributor

@c-w c-w 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

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 enhancement/c-w/remove-deprecated-test-methods branch from 325e1cf to 8944ef4 Compare May 7, 2018 17:13
Copy link
Member

@colinschoen colinschoen left a comment

Choose a reason for hiding this comment

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

LGTM

@colinschoen colinschoen merged commit 7664639 into okpy:master May 7, 2018
@c-w c-w deleted the enhancement/c-w/remove-deprecated-test-methods branch May 7, 2018 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants