Bump pytest to 7.0.0 (#65981)

This commit is contained in:
Tobias Sauerwein
2022-02-08 10:03:27 +01:00
committed by GitHub
parent a03d8179d0
commit 8b38fa58aa
7 changed files with 26 additions and 5 deletions

View File

@@ -26,14 +26,14 @@ TEST_BAD_SERIALIED = "THIS IS NOT JSON\n"
TMP_DIR = None
def setup():
"""Set up for tests."""
@pytest.fixture(autouse=True)
def setup_and_teardown():
"""Clean up after tests."""
global TMP_DIR
TMP_DIR = mkdtemp()
yield
def teardown():
"""Clean up after tests."""
for fname in os.listdir(TMP_DIR):
os.remove(os.path.join(TMP_DIR, fname))
os.rmdir(TMP_DIR)