Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
deckard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Knot projects
deckard
Commits
35d15353
Commit
35d15353
authored
Jul 26, 2018
by
Štěpán Balážik
Committed by
Petr Špaček
Aug 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pytest: explain pytest fixture weirdness a bit
parent
c7093aca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
conftest.py
conftest.py
+4
-3
rplint.py
rplint.py
+2
-2
No files found.
conftest.py
View file @
35d15353
...
...
@@ -105,7 +105,8 @@ def pytest_addoption(parser):
def
pytest_generate_tests
(
metafunc
):
"""This is pytest weirdness to parametrize the test over all the *.rpl files."""
"""This is pytest weirdness to parametrize the test over all the *.rpl files.
See https://docs.pytest.org/en/latest/parametrize.html#basic-pytest-generate-tests-example for more info."""
if
'scenario'
in
metafunc
.
fixturenames
:
if
metafunc
.
config
.
option
.
config
is
None
:
configs
=
[]
...
...
@@ -118,6 +119,6 @@ def pytest_generate_tests(metafunc):
paths
=
metafunc
.
config
.
option
.
scenarios
metafunc
.
parametrize
(
"scenario"
,
scenarios
(
paths
,
configs
),
ids
=
str
)
if
'rpl'
in
metafunc
.
fixturenames
:
if
'rpl
_path
'
in
metafunc
.
fixturenames
:
paths
=
metafunc
.
config
.
option
.
scenarios
metafunc
.
parametrize
(
"rpl"
,
rpls
(
paths
),
ids
=
str
)
metafunc
.
parametrize
(
"rpl
_path
"
,
rpls
(
paths
),
ids
=
str
)
rplint.py
View file @
35d15353
...
...
@@ -283,8 +283,8 @@ def step_duplicate_id(test):
# if "copy_id" not in adjust:
# entry_error(test, entry, "copy_id should be in ADJUST")
def
test_run_rplint
(
rpl
):
t
=
RplintTest
(
rpl
)
def
test_run_rplint
(
rpl
_path
):
t
=
RplintTest
(
rpl
_path
)
passed
=
t
.
run_checks
()
if
not
passed
:
raise
RplintError
(
t
.
results
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment