forked from sahib/rmlint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: migration from nose to pytest
Python 3.11 and higher are no longer compatible with nose. Signed-off-by: Vassili Tchersky <[email protected]>
- Loading branch information
Showing
52 changed files
with
246 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[pytest] | ||
markers = | ||
slow: slow tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
import pytest | ||
from tests.utils import cleanup_testdir, create_testdir | ||
import tests.utils as utils | ||
|
||
@pytest.fixture(autouse=True) | ||
def with_cleanup_between_runs(): | ||
cleanup_testdir() | ||
create_testdir() | ||
utils.cleanup_testdir() | ||
utils.create_testdir() | ||
|
||
|
||
@pytest.fixture(params=["sh", "bash", "dash"]) | ||
def shell(request): | ||
yield request.param | ||
|
||
|
||
@pytest.fixture | ||
def usual_setup_usual_teardown(): | ||
utils.usual_setup_func() | ||
yield | ||
utils.usual_teardown_func() | ||
|
||
|
||
@pytest.fixture | ||
def usual_setup_mount_bind_teardown(): | ||
utils.usual_setup_func() | ||
yield | ||
utils.mount_bind_teardown_func() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
nose==1.3.7 | ||
pytest==8.3.4 | ||
parameterized==0.6.1 | ||
xattr==0.9.6 | ||
psutil==5.6.6 | ||
pytest==8.3.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.