Skip to content

Make sure all test id's are reproducible #417

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

Merged
merged 2 commits into from
Dec 1, 2020
Merged

Conversation

ajvb
Copy link
Contributor

@ajvb ajvb commented Nov 16, 2020

Fixes the ids argument in all parameterize calls that make use of zip() so that the outputted id is actually generated.

Fixes #412

@ajvb ajvb requested review from hwine and g-k November 16, 2020 17:46
Copy link
Contributor

@g-k g-k left a comment

Choose a reason for hiding this comment

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

r+ lgtm

Not sure how hard it was to make all these changes, but since we're using tests as code maybe we should look into tools for editing the concrete syntax tree (e.g. something based on https://pypi.org/project/libcst/ or another library I couldn't dig up).

Copy link
Contributor

@hwine hwine left a comment

Choose a reason for hiding this comment

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

Looking for an answer and/or a comment

@hwine
Copy link
Contributor

hwine commented Nov 16, 2020

Not sure how hard it was to make all these changes, but since we're using tests as code maybe we should look into tools for editing the concrete syntax tree (e.g. something based on https://pypi.org/project/libcst/ or another library I couldn't dig up).

You lost me -- what's the maintenance issue you see (i.e. use case), and how would libcst solve that?

@g-k
Copy link
Contributor

g-k commented Nov 16, 2020

Not sure how hard it was to make all these changes, but since we're using tests as code maybe we should look into tools for editing the concrete syntax tree (e.g. something based on https://pypi.org/project/libcst/ or another library I couldn't dig up).

You lost me -- what's the maintenance issue you see (i.e. use case), and how would libcst solve that?

Safely editing a bunch of test and resource files e.g. converting all str.format calls to f-strings https://libcst.readthedocs.io/en/latest/codemods_tutorial.html

@hwine
Copy link
Contributor

hwine commented Nov 30, 2020

You lost me -- what's the maintenance issue you see (i.e. use case), and how would libcst solve that?

Safely editing a bunch of test and resource files e.g. converting all str.format calls to f-strings https://libcst.readthedocs.io/en/latest/codemods_tutorial.html

Ah, there's a pre-commit plugin for that (and more): pyupgrade. Besides fstrings, it also catches other python changes that the code can take advantages of. See the README

I'd be happy to see that plugin added to frost -- it'll help when we have to go to python 3.9 (yearly updates now). I think all of it's changes should be a separate PR for a "flag day", so we can all do our merges-for-active-branches prior, and have that change apply cleanly.

@hwine hwine self-requested a review December 1, 2020 18:59
Copy link
Contributor

@hwine hwine left a comment

Choose a reason for hiding this comment

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

Thanks for opening the related issue -- we're good to go

@ajvb ajvb merged commit 4ef25ec into master Dec 1, 2020
@ajvb ajvb deleted the ajvb/repro-test-ids branch December 1, 2020 19: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.

Make sure all test id's are reproducible
3 participants