-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
🧪 initial tests #28
🧪 initial tests #28
Conversation
54d662e
to
430b2b8
Compare
c6bd754
to
45655c0
Compare
def plugin_check_command( | ||
self, command: Union[str, List[str]], *, shell: bool = False, **kwargs: Any | ||
) -> CompletedProcess: | ||
""" | ||
Run a command from the virtualenv | ||
""" | ||
return self.virtual_env.platform.check_command( | ||
command=command, | ||
shell=shell, | ||
**kwargs, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separating this into its own function made this manageable to patch in testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @oprypin I'm going to merge this one through to start focusing on smaller tests to add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure just do it :D
fe96f84
to
48173af
Compare
expected_call = [ | ||
"python", | ||
"-u", | ||
"-m", | ||
"pip", | ||
"install", | ||
"--disable-pip-version-check", | ||
"--no-python-version-warning", | ||
"-q", | ||
"--requirement", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider https://github.com/15r10nk/inline-snapshot/ to make future updates of expected values easier :)
Disclaimer: I actually haven't tried it out myself
🎉 This PR is included in version 1.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Mm I find it quite unreasonable that this pull request constitutes a release |
I actually debated on whether or not to trigger a release for this, ultimately since e39e82d changed the code-path and needed a version increment. Right now my release mechanism only has patch releases for bug commits - and this wasn't a bug. Do you think this should've been a non-release change? Good to know that you felt the release notes included noise - that can be cut back. |
I see the point about the code path.. But I think that actually doesn't make sense. Just declare that this codebase is not meant to be used as an import in Python and that's that 😃 |
Or maybe I misunderstood what you meant.. semantic-release seems to define ✨ as something greater than a bugfix whereas this I think was something lesser than a bugfix because there's 0 impact for users |
That commit was probably something like 🎨 (code tidying) which didn't warrant a release - but some calls to I get your point though - that shouldn't happen again. |
Hmm well if it was a change in behavior then I guess it should be described, but the description is "plugin command runner". I actually didn't understand that this is a change. Anyway just thoughts out loud |
Summary
This PR adds some initial tests to the
hatch-pip-compile
plugin. The tests are a start and coverage isn't complete yet - more to come later.Test fixtures were adapted from hatch's fixtures: https://github.com/pypa/hatch/blob/master/tests/conftest.py
Relates to #18