Skip to content

Commit abeaab8

Browse files
pszulczewskiPatryk Szulczewski
andauthored
Tidy up mocks (#11)
* CRLF -> LF * updated tasks.py * Tidy-up mock files * fix pytests in invoke * uniform parametrize, move fail message to utils * expected results from json to test files * rebased on main Co-authored-by: Patryk Szulczewski <patryk.szulczewski@networktocode.com>
1 parent 797bfec commit abeaab8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+201
-324
lines changed

netcompare/check_type.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ def init(*args):
2424
raise NotImplementedError
2525

2626
@staticmethod
27-
def get_value(
28-
value: Mapping, path: Mapping, exclude: List = None
29-
) -> Union[Mapping, List, int, str, bool]:
27+
def get_value(value: Mapping, path: Mapping, exclude: List = None) -> Union[Mapping, List, int, str, bool]:
3028
"""Return the value contained into a Mapping for a defined path."""
3129
return extract_values_from_output(value, path, exclude)
3230

tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def rebuild(context):
100100

101101

102102
@task(help={"local": "Run locally or within the Docker container"})
103-
def pytest(context, path=".", local=INVOKE_LOCAL):
103+
def pytest(context, local=INVOKE_LOCAL):
104104
"""Run pytest test cases."""
105-
exec_cmd = f"pytest {path}"
105+
exec_cmd = "pytest"
106106
run_cmd(context, exec_cmd, local)
107107

108108

@@ -164,6 +164,6 @@ def tests(context, path=".", local=INVOKE_LOCAL):
164164
yamllint(context, path, local)
165165
pydocstyle(context, path, local)
166166
bandit(context, path, local)
167-
pytest(context, path, local)
167+
pytest(context, local)
168168

169169
print("All tests have passed!")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)