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 tests #140

Merged
merged 1 commit into from
Jan 17, 2018
Merged

Fix tests #140

merged 1 commit into from
Jan 17, 2018

Conversation

jklukas
Copy link
Member

@jklukas jklukas commented Jan 17, 2018

Fixes a variety of bugs in the tests where we've drifted out of sync with changes in Redshift and SQLAlchemy.

Fixes #131

Todos

  • MIT compatible
  • Tests
  • Documentation
  • Updated CHANGES.rst

encodings_removed = re.sub(r'\s+ENCODE\s+\w+', '', query)
return re.sub(r'\s+', ' ', encodings_removed).strip()
query = re.sub(r'\s+ENCODE\s+\w+', '', query)
query = re.sub(r'\s+CONSTRAINT\s+[a-zA-Z0-9_".]+', '', query)
Copy link
Member Author

Choose a reason for hiding this comment

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

This scrubs out all CONSTRAINT constraintname strings out of DDL when we're comparing, and we're able to avoid changing the expected DDL we code in the tests.

@@ -6,7 +6,7 @@ passenv = PGPASSWORD
commands = py.test {posargs}
deps =
requests==2.7.0
psycopg2==2.6.0
psycopg2==2.7.3.2
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes a problem with the postgres version available on travis. See psycopg/psycopg2#594

of sync with changes in Redshift and SQLAlchemy.

Fixes #131
@jklukas
Copy link
Member Author

jklukas commented Jan 17, 2018

Travis run is clean!

@graingert
Copy link
Member

I can't believe bigcrunch is still working after all this time

@jklukas jklukas merged commit 3cd61fd into master Jan 17, 2018
@jklukas jklukas deleted the fixtests branch January 17, 2018 20:30
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