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

Simplify migration tests #215

Merged
merged 6 commits into from
May 18, 2020
Merged

Simplify migration tests #215

merged 6 commits into from
May 18, 2020

Conversation

ewjoachim
Copy link
Member

No ticket

Ping @elemoine : Starting from your work, I simplified the process a bit. It does the same, but a bit differently. You may or may not like 100%, we can discuss any part you think is still improvable, as usual :)

Successful PR Checklist:

  • Tests
    • (not applicable?)
  • Documentation
    • (not applicable?)
  • Had a good time contributing?

@ewjoachim ewjoachim force-pushed the migration_tests branch 2 times, most recently from 6dfda45 to 18f875e Compare May 16, 2020 21:26
Copy link
Contributor

@elemoine elemoine left a comment

Choose a reason for hiding this comment

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

I wouldn't qualify this as a simplification but it looks great :-) I like it.


env = {**os.environ, "PGSERVICEFILE": "tests/migration/pgservice.ini"}
Copy link
Member Author

Choose a reason for hiding this comment

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

@elemoine This way, we don't even need to name the fixture

Copy link
Member Author

@ewjoachim ewjoachim May 17, 2020

Choose a reason for hiding this comment

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

I checked with 3.6 just in case

Python 3.6.9 (default, Dec 14 2019, 18:23:02)
[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> {**{1: 2}, 3:4}
{1: 2, 3: 4}
>>> {**{3: 2}, 3:4}
{3: 4}

Copy link
Contributor

Choose a reason for hiding this comment

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

I keep forgetting about this syntax. Looks good.

@ewjoachim ewjoachim closed this May 17, 2020
@ewjoachim ewjoachim reopened this May 17, 2020
@ewjoachim
Copy link
Member Author

Dammit wrong button sorry.

@ewjoachim ewjoachim merged commit 6c2c5e6 into master May 18, 2020
@ewjoachim ewjoachim deleted the migration_tests branch May 18, 2020 07:00
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