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

DEP: Replacing the assertRaisesRegexp which is deprecated by assertRaisesRegex #2622

Merged
merged 2 commits into from
Feb 4, 2020

Conversation

samatix
Copy link
Contributor

@samatix samatix commented Jan 19, 2020

This deprecation will enable the upgrade to add support for python 3.7 and higher
https://docs.python.org/3/library/unittest.html

…isesRegex

This deprecation will enable the upgrade to add support for python 3.7 and higher
@coveralls
Copy link

coveralls commented Jan 19, 2020

Coverage Status

Coverage increased (+0.2%) to 88.184% when pulling 9340f38 on samatix:assertregex into c825927 on quantopian:master.

Copy link
Contributor

@ssanderson ssanderson left a comment

Choose a reason for hiding this comment

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

@samatix it looks to me like this is failing the build in Python 2.

I think the easiest fix for that would be to conditionally define assertRaisesRegex on ZiplineTestCase with something like:

if six.PY2:
    def assertRaisesRegex(self, *args, **kwargs):
        return self.assertRaisesRegexp(*args, **kwargs)

@ssanderson
Copy link
Contributor

@samatix are you still planning to come back to this? If not, I or one of the other Zipline maintainers can push this over the line.

@samatix
Copy link
Contributor Author

samatix commented Feb 4, 2020

@samatix are you still planning to come back to this? If not, I or one of the other Zipline maintainers can push this over the line.

Definitely @ssanderson, I'll do the amendment this evening.

Copy link
Contributor

@ssanderson ssanderson left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fixes!

@ssanderson ssanderson merged commit b43b558 into quantopian:master Feb 4, 2020
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.

3 participants