Skip to content

Commit cef594c

Browse files
committed
address comments
1 parent b0f395b commit cef594c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/pytest_plugins/filler/ported_tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def convert_to_filled(file_path: str) -> str | None:
4949
path = path.replace("TestsFiller", "Tests")
5050

5151
# Replace file extension to .json
52-
path = re.sub(r"Filler\.(yml|yaml|json)$", r".json", path)
52+
path = re.sub(r"Filler\.(yml|yaml|json)$", ".json", path)
5353

5454
return path
5555

@@ -98,6 +98,7 @@ def __init__(self, config) -> None:
9898
"""Initialize the plugin with the given pytest config."""
9999
self.config = config
100100
self.show_mode = config.getoption("show_ported_from")
101+
self.links_as_filled = config.getoption("links_as_filled")
101102

102103
@pytest.hookimpl(hookwrapper=True, trylast=True)
103104
def pytest_collection_modifyitems(self, session, config, items):
@@ -136,7 +137,7 @@ def pytest_collection_modifyitems(self, session, config, items):
136137
else: # default to "paths"
137138
output = sorted(paths)
138139

139-
if config.getoption("links_as_filled"):
140+
if self.links_as_filled:
140141
all_files: list = []
141142
for item in output:
142143
converted_link = convert_to_filled(item)

src/pytest_plugins/help/help.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def pytest_configure(config):
7979
"filler location",
8080
"defining debug",
8181
"pre-allocation behavior during test filling",
82+
"ported",
8283
],
8384
)
8485
elif config.getoption("show_consume_help"):

0 commit comments

Comments
 (0)