This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
forked from reverbc/pylint-pytest
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from anis-campos/fix_is_pytest_fixture
See more details in pylint-dev#2
- Loading branch information
Showing
3 changed files
with
60 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from pytest import fixture | ||
|
||
|
||
@fixture | ||
def simple_decorator(): | ||
"""the fixture using the decorator without executing it""" | ||
|
||
|
||
def test_simple_fixture(simple_decorator): | ||
assert True | ||
|
||
|
||
@fixture() | ||
def un_configured_decorated(): | ||
"""the decorated is called without argument, like scope""" | ||
|
||
|
||
def test_un_configured_decorated(un_configured_decorated): | ||
assert True | ||
|
||
|
||
@fixture(scope="function") | ||
def configured_decorated(): | ||
"""the decorated is called with argument, like scope""" | ||
|
||
|
||
def test_un_configured_decorated(configured_decorated): | ||
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