From 2cb195ffad0b28c78a5f238ac644d98360c0bece Mon Sep 17 00:00:00 2001 From: Andrew Walker Date: Mon, 16 Dec 2024 15:52:39 -0600 Subject: [PATCH] Change scope of getting FD count in unit test fixture 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. --- tests/unit/test_copytree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_copytree.py b/tests/unit/test_copytree.py index e7d8e1adbe69e..e0fdc83fa4326 100644 --- a/tests/unit/test_copytree.py +++ b/tests/unit/test_copytree.py @@ -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()