Skip to content

Commit

Permalink
remove dist in cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Huong Nguyen <huongg1409@gmail>
  • Loading branch information
Huong Nguyen committed Oct 1, 2024
1 parent 4d929d6 commit 5476a2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@

# Define a fixture for setup and cleanup
@pytest.fixture
def build_and_cleanup():
def cleanup():
# Setup can be done here if needed
yield # This yields control to the test function
# Cleanup: Remove the wheel_contents directory after the test
shutil.rmtree('wheel_contents', ignore_errors=True)
shutil.rmtree('dist', ignore_errors=True)

# Use the fixture in your test by including it as a parameter
def test_built_wheel_contains_expected_files(build_and_cleanup):
def test_built_wheel_contains_expected_files(cleanup):
# Build the project
subprocess.run(['uv', 'build'], check=True)

Expand Down

0 comments on commit 5476a2a

Please sign in to comment.