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

Port the plugin resolver test to v2 test style. #10424

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

benjyw
Copy link
Sponsor Contributor

@benjyw benjyw commented Jul 22, 2020

Previously it used some hackery to get hold of various
subsystems to construct a pex to run setup.py, in order
to create the plugin dists it then tested against.

This change uses v2 test idioms to create and run that pex.

As a result, we can delete a lot of code that only hung around
because of this one test.

Unfortunately, this required making the test functions methods
of a test class, meaning we can no longer use pytest.mark.parameterize,
and have to "parameterize" manually.

[ci skip-rust-tests]

Previously it used some hackery to get hold of various
subsystems to construct a pex to run setup.py, in order
to create the plugin dists it then tested against.

This change uses v2 test idioms to create and run
that pex.

As a result, we can delete a lot of code that only
hung around because of this one test.

Unfortunately, this required making the test functions
methods of a test class, meaning we can no longer
use pytest.mark.parameterize, and have to "parameterize"
manually.

[ci skip-rust-tests]
@benjyw
Copy link
Sponsor Contributor Author

benjyw commented Jul 22, 2020

Note the commits are reviewable independently.

@benjyw
Copy link
Sponsor Contributor Author

benjyw commented Jul 22, 2020

Extra bonus: The new tests run in about half the time of the old ones.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Excellent! Thank you for doing this!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 6f8ec6d on benjyw:test_plugin_resolver into a49350d on pantsbuild:master.

@benjyw benjyw merged commit e4b6476 into pantsbuild:master Jul 22, 2020
@benjyw benjyw deleted the test_plugin_resolver branch July 22, 2020 18:18
@benjyw
Copy link
Sponsor Contributor Author

benjyw commented Jul 22, 2020

Not going to change the nits because they aren't worth another CI cycle... :)

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.

3 participants