summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2021-05-02 15:33:42 -0700
committerMicah Lee <micah@micahflee.com>2021-05-02 15:33:42 -0700
commit21b4ae06f03995153e00f31da81f8a203127dace (patch)
tree236b490dd94d15af0ba95f403370f9829680c970
parent3c36c4766c26637a7832285b45a3616d5081ec13 (diff)
downloadonionshare-21b4ae06f03995153e00f31da81f8a203127dace.tar.gz
onionshare-21b4ae06f03995153e00f31da81f8a203127dace.zip
Remove deprecated pytest stuff
-rw-r--r--cli/tests/conftest.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/cli/tests/conftest.py b/cli/tests/conftest.py
index 8ab61c54..37b929ec 100644
--- a/cli/tests/conftest.py
+++ b/cli/tests/conftest.py
@@ -54,8 +54,7 @@ def temp_dir_1024(temp_dir):
return new_temp_dir
-# pytest > 2.9 only needs @pytest.fixture
-@pytest.yield_fixture
+@pytest.fixture
def temp_dir_1024_delete(temp_dir):
"""Create a temporary directory that has a single file of a
particular size (1024 bytes). The temporary directory (including
@@ -78,8 +77,7 @@ def temp_file_1024(temp_dir):
return tmp_file.name
-# pytest > 2.9 only needs @pytest.fixture
-@pytest.yield_fixture
+@pytest.fixture
def temp_file_1024_delete(temp_dir):
"""
Create a temporary file of a particular size (1024 bytes).
@@ -93,8 +91,7 @@ def temp_file_1024_delete(temp_dir):
yield tmp_file.name
-# pytest > 2.9 only needs @pytest.fixture
-@pytest.yield_fixture(scope="session")
+@pytest.fixture(scope="session")
def custom_zw():
zw = web.share_mode.ZipWriter(
common.Common(),
@@ -106,8 +103,7 @@ def custom_zw():
os.remove(zw.zip_filename)
-# pytest > 2.9 only needs @pytest.fixture
-@pytest.yield_fixture(scope="session")
+@pytest.fixture(scope="session")
def default_zw():
zw = web.share_mode.ZipWriter(common.Common())
yield zw