Skip to content

Fix tests#140

Merged
jklukas merged 1 commit into
masterfrom
fixtests
Jan 17, 2018
Merged

Fix tests#140
jklukas merged 1 commit into
masterfrom
fixtests

Conversation

@jklukas

@jklukas jklukas commented Jan 17, 2018

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

Comment thread tox.ini
deps =
requests==2.7.0
psycopg2==2.6.0
psycopg2==2.7.3.2

Copy link
Copy Markdown
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

jklukas commented Jan 17, 2018

Copy link
Copy Markdown
Member Author

Travis run is clean!

@graingert

Copy link
Copy Markdown
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