Skip to content

Commit

Permalink
Change scope of getting FD count in unit test fixture
Browse files Browse the repository at this point in the history
This commit changes the scope for getting the count of open file
descriptors for our copytree tests. This gives more accurate
view of where an fd may leak during the test runs and eliminates
a potential area for false-positives.
  • Loading branch information
anodos325 committed Dec 17, 2024
1 parent b7dc3b2 commit 2cb195f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/test_copytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def get_fd_count() -> int:
return len(os.listdir('/proc/self/fd'))


@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def fd_count() -> int:
return get_fd_count()

Expand Down

0 comments on commit 2cb195f

Please sign in to comment.