mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 03:37:28 -03:00
Remove deprecated pytest stuff
This commit is contained in:
parent
3c36c4766c
commit
21b4ae06f0
1 changed files with 4 additions and 8 deletions
|
@ -54,8 +54,7 @@ def temp_dir_1024(temp_dir):
|
||||||
return new_temp_dir
|
return new_temp_dir
|
||||||
|
|
||||||
|
|
||||||
# pytest > 2.9 only needs @pytest.fixture
|
@pytest.fixture
|
||||||
@pytest.yield_fixture
|
|
||||||
def temp_dir_1024_delete(temp_dir):
|
def temp_dir_1024_delete(temp_dir):
|
||||||
"""Create a temporary directory that has a single file of a
|
"""Create a temporary directory that has a single file of a
|
||||||
particular size (1024 bytes). The temporary directory (including
|
particular size (1024 bytes). The temporary directory (including
|
||||||
|
@ -78,8 +77,7 @@ def temp_file_1024(temp_dir):
|
||||||
return tmp_file.name
|
return tmp_file.name
|
||||||
|
|
||||||
|
|
||||||
# pytest > 2.9 only needs @pytest.fixture
|
@pytest.fixture
|
||||||
@pytest.yield_fixture
|
|
||||||
def temp_file_1024_delete(temp_dir):
|
def temp_file_1024_delete(temp_dir):
|
||||||
"""
|
"""
|
||||||
Create a temporary file of a particular size (1024 bytes).
|
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
|
yield tmp_file.name
|
||||||
|
|
||||||
|
|
||||||
# pytest > 2.9 only needs @pytest.fixture
|
@pytest.fixture(scope="session")
|
||||||
@pytest.yield_fixture(scope="session")
|
|
||||||
def custom_zw():
|
def custom_zw():
|
||||||
zw = web.share_mode.ZipWriter(
|
zw = web.share_mode.ZipWriter(
|
||||||
common.Common(),
|
common.Common(),
|
||||||
|
@ -106,8 +103,7 @@ def custom_zw():
|
||||||
os.remove(zw.zip_filename)
|
os.remove(zw.zip_filename)
|
||||||
|
|
||||||
|
|
||||||
# pytest > 2.9 only needs @pytest.fixture
|
@pytest.fixture(scope="session")
|
||||||
@pytest.yield_fixture(scope="session")
|
|
||||||
def default_zw():
|
def default_zw():
|
||||||
zw = web.share_mode.ZipWriter(common.Common())
|
zw = web.share_mode.ZipWriter(common.Common())
|
||||||
yield zw
|
yield zw
|
||||||
|
|
Loading…
Reference in a new issue