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.
nose is no longer maintained, see nose-devs/nose#1099 (comment). This was initially submitted here: https://bugs.gentoo.org/878695. This commit switches to pytest. Amongst the changes, here are the most relevant ones: * Create a conftest.py that contains fixtures. * Replace nose.with_setup with yield fixtures. * Use pytest.skip instead of print and nose.plugins.skip.SkipTest. * Use pytest.mark.slow instead of nose.plugins.attrib.attr("slow"). * Use pytest.mark.parametrize instead of parameterized, simplify parametrized tests that use both `shell` and `inverse_order`. * Update Travis config. * Update SConscript. * Update documentation.
- Loading branch information
Showing
51 changed files
with
210 additions
and
393 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
nose==1.3.7 | ||
parameterized==0.6.1 | ||
xattr==0.9.6 | ||
psutil==5.6.6 | ||
pytest |
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,21 @@ | ||
import pytest | ||
|
||
from tests.utils import mount_bind_teardown_func, usual_setup_func, usual_teardown_func | ||
|
||
@pytest.fixture(params=["sh", "bash", "dash"]) | ||
def shell(request): | ||
yield request.param | ||
|
||
|
||
@pytest.fixture | ||
def usual_setup_usual_teardown(): | ||
usual_setup_func() | ||
yield | ||
usual_teardown_func() | ||
|
||
|
||
@pytest.fixture | ||
def usual_setup_mount_bind_teardown(): | ||
usual_setup_func() | ||
yield | ||
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
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.