forked from ftobia/pytest-ordering
-
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.
- manually merged from PR ftobia#37 by @zinnjonas - supports multiple markers like run(before=), run(after=) etc. - see http://pytest-ordering.readthedocs.io/en/develop/
- Loading branch information
1 parent
063573e
commit e25516c
Showing
9 changed files
with
399 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ Sergei Chipiga <[email protected]> | |
Ben Greene <[email protected]> | ||
Adam Talsma <[email protected]> | ||
Brian Maissy <[email protected]> | ||
Jonas Zinn <[email protected]> |
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,6 @@ | ||
def test_foo(): | ||
assert True | ||
|
||
|
||
def test_bar(): | ||
assert True |
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 | ||
|
||
|
||
@pytest.mark.run(order=-2) | ||
def test_three(): | ||
assert True | ||
|
||
|
||
@pytest.mark.run(order=-1) | ||
def test_four(): | ||
assert True | ||
|
||
|
||
@pytest.mark.run(order=2) | ||
def test_two(): | ||
assert True | ||
|
||
|
||
@pytest.mark.run(order=1) | ||
def test_one(): | ||
assert True |
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 | ||
|
||
|
||
@pytest.mark.run('second_to_last') | ||
def test_three(): | ||
assert True | ||
|
||
|
||
@pytest.mark.run('last') | ||
def test_four(): | ||
assert True | ||
|
||
|
||
@pytest.mark.run('second') | ||
def test_two(): | ||
assert True | ||
|
||
|
||
@pytest.mark.run('first') | ||
def test_one(): | ||
assert True |
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 | ||
|
||
|
||
@pytest.mark.second_to_last | ||
def test_three(): | ||
assert True | ||
|
||
|
||
@pytest.mark.last | ||
def test_four(): | ||
assert True | ||
|
||
|
||
@pytest.mark.second | ||
def test_two(): | ||
assert True | ||
|
||
|
||
@pytest.mark.first | ||
def test_one(): | ||
assert True |
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,11 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.order2 | ||
def test_foo(): | ||
assert True | ||
|
||
|
||
@pytest.mark.order1 | ||
def test_bar(): | ||
assert True |
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,15 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.run(after='test_second') | ||
def test_third(): | ||
assert True | ||
|
||
|
||
def test_second(): | ||
assert True | ||
|
||
|
||
@pytest.mark.run(before='test_second') | ||
def test_first(): | ||
assert True |
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.