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/test cleanup #1578

Merged
merged 3 commits into from
Jun 27, 2019
Merged

Fix/test cleanup #1578

merged 3 commits into from
Jun 27, 2019

Conversation

heisencoder
Copy link
Contributor

This branch contains some misc. test cleanup that I noticed while updating our internal build system with the latest dbt alpha release. It includes fixes to remove deprecation warnings during testing and also a minor update to have test_context.py do a local import of mock_adapter.py (in a manner consistent with how other tests import utils.py).

Matt Ball added 2 commits June 27, 2019 08:28
This is consistent with the way that unit tests import utils.py and
also fixes an import issue with our test environment.
We're getting a bunch of deprecation warnings when running the unit
tests due to using statements like assertEquals instead of assertEqual.
This change removes these warnings.

Change completed via these Linux commands:

$ cd test/unit
$ sed -i 's/self.assertEquals/self.assertEqual/g' test_*.py
$ sed -i 's/self.assertNotEquals/self.assertNotEqual/g' test_*.py
@drewbanin drewbanin requested a review from beckjake June 27, 2019 15:01
Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

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

I actually took care of assertEquals -> assertEqual here: #1490 - it just isn't in wilt-chamberlain, it's in our next version's dev branch, but I dig your style :)

I still approve this PR because of the import fix, I'll clean up the merge into louisa-may-alcott if there's any trouble there - sometimes git gets mad when you make the same fix twice

This is to remove deprecation warnings during testing.

Linux commands (with globstar shell option enable):

$ cd test
$ sed -i 's/self.assertEquals/self.assertEqual/g' **/*.py
$ sed -i 's/self.assertNotEquals/self.assertNotEqual/g' **/*.py
@heisencoder
Copy link
Contributor Author

Sounds good!

I also noticed that a couple integration tests needed to be updated as well. I just committed that change to the branch before I saw your approval on this change. I hope that doesn't cause additional trouble!

@beckjake
Copy link
Contributor

beckjake commented Jun 27, 2019

No problem, just takes me a pull + push to the pr/ branch!

Bigquery had an ephemeral failure with seed here - in a future version of dbt we'll make it retry those failures, they're very annoying.

@beckjake beckjake merged commit f368820 into dbt-labs:dev/wilt-chamberlain Jun 27, 2019
@beckjake
Copy link
Contributor

Thanks for your contribution @heisencoder!

@heisencoder heisencoder deleted the fix/test-cleanup branch June 27, 2019 16:54
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