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

Tools for speeding up tests using Git #84

Merged
merged 12 commits into from
Nov 19, 2024
Merged

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Oct 20, 2024

  • Git repository factory as a context manager – enables writing Git repository fixtures with different scopes
  • Module-scoped Git repository fixture for Pytest (built using the factory above)
  • Darkgraylib's own tests sped up using these tools

These tools help speed up parameterized tests which need a Git repository, especially on Windows where forked processes are comically expensive.

See akaihola/darker#761 and akaihola/graylint#68 for usages of these tools.

@akaihola akaihola added the enhancement New feature or request label Oct 20, 2024
@akaihola akaihola added this to the Darkgraylib 2.1.0 milestone Oct 20, 2024
@akaihola akaihola self-assigned this Oct 20, 2024
@akaihola akaihola force-pushed the module-scope-git-repo-fixture branch from c3e6bca to 18ede9f Compare October 21, 2024 20:39
@akaihola akaihola requested a review from DeinAlptraum October 27, 2024 20:27
@akaihola akaihola force-pushed the module-scope-git-repo-fixture branch from ff9f097 to 64951cc Compare November 3, 2024 19:34
@DeinAlptraum
Copy link
Collaborator

FYI: I'm not ignoring this, just waiting until you've fixed the builds etc. before I leave a review. Won't have much to say either way though.

@akaihola akaihola marked this pull request as draft November 7, 2024 09:48
@akaihola
Copy link
Owner Author

akaihola commented Nov 7, 2024

FYI: I'm not ignoring this, just waiting until you've fixed the builds etc. before I leave a review. Won't have much to say either way though.

Great to hear @DeinAlptraum! On your note, I converted this into a draft for clarity. I'm working on this on and off, needed to refine the implementation a bit while taking it into use on the Darker side (no pun intended 😄).

@akaihola akaihola force-pushed the module-scope-git-repo-fixture branch 3 times, most recently from 0391a07 to d3e7184 Compare November 16, 2024 21:35
@akaihola akaihola force-pushed the module-scope-git-repo-fixture branch from d3e7184 to 218e098 Compare November 17, 2024 20:54
@akaihola akaihola marked this pull request as ready for review November 17, 2024 20:59
@akaihola akaihola changed the title Module-scoped Git repository fixture for Pytest Tools for speeding up tests using Git Nov 17, 2024
@akaihola
Copy link
Owner Author

@DeinAlptraum this is now ready for review.

Copy link
Collaborator

@DeinAlptraum DeinAlptraum left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

@akaihola akaihola merged commit 92fbaf3 into main Nov 19, 2024
35 checks passed
@akaihola akaihola deleted the module-scope-git-repo-fixture branch November 19, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

2 participants