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

Added asserts for all warnings in deprecation tests. #10172

Merged
merged 1 commit into from Jul 11, 2018
Merged

Added asserts for all warnings in deprecation tests. #10172

merged 1 commit into from Jul 11, 2018

Conversation

jdufresne
Copy link
Member

@jdufresne jdufresne commented Jul 11, 2018

When tests run with Python warnings enabled, catches warnings of the form:

.../django/tests/deprecation/tests.py:77: DeprecationWarning: `Deprecated.old` method should be renamed `new`.
  class Deprecated(Renamed):
.../django/tests/deprecation/tests.py:133: DeprecationWarning: `DeprecatedMixin.old` method should be renamed `new`.
  class Deprecated(DeprecatedMixin, RenamedMixin, Renamed):
.../django/tests/deprecation/tests.py:54: DeprecationWarning: `Manager.old` method should be renamed `new`.
  class Manager(metaclass=RenameManagerMethods):
.../django/tests/deprecation/tests.py:96: DeprecationWarning: `Deprecated.old` method should be renamed `new`.
  class Deprecated(metaclass=RenameManagerMethods):

When tests run with Python warnings enables, catches warnings of the
form:

.../django/tests/deprecation/tests.py:77: DeprecationWarning: `Deprecated.old` method should be renamed `new`.
  class Deprecated(Renamed):
.../django/tests/deprecation/tests.py:133: DeprecationWarning: `DeprecatedMixin.old` method should be renamed `new`.
  class Deprecated(DeprecatedMixin, RenamedMixin, Renamed):
.../django/tests/deprecation/tests.py:54: DeprecationWarning: `Manager.old` method should be renamed `new`.
  class Manager(metaclass=RenameManagerMethods):
.../django/tests/deprecation/tests.py:96: DeprecationWarning: `Deprecated.old` method should be renamed `new`.
  class Deprecated(metaclass=RenameManagerMethods):
Copy link
Member

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

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

Yes, good. I saw these when checking #10164: nice one picking them up.

I'll just hold off merging because of the CI failure (which is unrelated but...)

@timgraham timgraham merged commit e26b780 into django:master Jul 11, 2018
@jdufresne jdufresne deleted the warning branch July 11, 2018 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants