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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃И more tests #45

Merged
merged 8 commits into from
Dec 18, 2023
Merged

馃И more tests #45

merged 8 commits into from
Dec 18, 2023

Conversation

juftin
Copy link
Owner

@juftin juftin commented Dec 12, 2023

This PR includes a new all-in-one testing fixture, pip_compile (PipCompileFixture) that can be used throughout the tests.

This PR also includes a number of new tests, including what I'm calling "integration tests" at tests/test_integration.py. These tests ultimately make calls to pip-tools / pip and create their own virtual environments inside the testing isolation temp dirs.

Closes #18

@juftin juftin changed the title 馃И integration tests 馃И more tests Dec 12, 2023
@@ -122,6 +122,7 @@ def pip_compile_cli(self) -> None:
"""
if not self.dependencies:
self.piptools_lock_file.unlink(missing_ok=True)
self.lockfile_up_to_date = True
Copy link
Owner Author

Choose a reason for hiding this comment

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

This is the only material code change of the PR - it was added to resolve test_delete_dependencies

@juftin juftin marked this pull request as ready for review December 12, 2023 17:06
Copy link
Contributor

@oprypin oprypin left a comment

Choose a reason for hiding this comment

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

I don't think I'll be able to properly look at this in the next days, but just had a small comment anyway


import pytest
import tomlkit
Copy link
Contributor

Choose a reason for hiding this comment

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

Add tomlkit to test dependencies?

dependencies = [

Copy link
Owner Author

Choose a reason for hiding this comment

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

tomlkit came along with hatch, do you think it's worth it to declare as a dep?

tomlkit==0.12.3
# via
# -c requirements.txt
# hatch

Copy link
Contributor

Choose a reason for hiding this comment

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

We put things into dependencies when we use them, we don't just skip dependencies because something somewhere happens to pull it in at the moment. Hatch does not have a documented feature "provide tomlkit" and it could reasonably stop using that library any time.

@juftin juftin self-assigned this Dec 14, 2023
@juftin juftin merged commit 0f2bdac into main Dec 18, 2023
6 checks passed
@juftin juftin deleted the tests/integration_tests branch December 18, 2023 18:34
@juftin
Copy link
Owner Author

juftin commented Dec 20, 2023

馃帀 This PR is included in version 1.8.3 馃帀

The release is available on GitHub release

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

馃И tests
2 participants