Skip to content

Commit

Permalink
0.2.20
Browse files Browse the repository at this point in the history
  • Loading branch information
smythi93 committed Jul 25, 2024
1 parent 300a19f commit 3a4f40f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "sflkit"
version = "0.2.19"
version = "0.2.20"
authors = [
{ name = "Marius Smytzek", email = "[email protected]" },
]
Expand Down
9 changes: 8 additions & 1 deletion src/sflkit/runners/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def get_tests(
files: Optional[List[os.PathLike] | os.PathLike] = None,
base: Optional[os.PathLike] = None,
environ: Environment = None,
k: str = None,
) -> List[str]:
return []

Expand Down Expand Up @@ -101,6 +102,7 @@ def run(
files: Optional[List[os.PathLike] | os.PathLike] = None,
base: Optional[os.PathLike] = None,
environ: Environment = None,
k: str = None,
):
self.passing_tests.clear()
self.failing_tests.clear()
Expand All @@ -109,7 +111,7 @@ def run(
directory,
output,
self.filter_tests(
self.get_tests(directory, files=files, base=base, environ=environ)
self.get_tests(directory, files=files, base=base, environ=environ, k=k)
),
environ=environ,
)
Expand Down Expand Up @@ -285,9 +287,13 @@ def get_tests(
files: Optional[List[os.PathLike] | os.PathLike] = None,
base: Optional[os.PathLike] = None,
environ: Environment = None,
k: str = None,
) -> List[str]:
c = []
directory = directory.absolute()
if k:
c.append("-k")
c.append(k)
if files:
if isinstance(files, (str, os.PathLike)):
c.append(str(files))
Expand Down Expand Up @@ -405,6 +411,7 @@ def get_tests(
files: Optional[List[os.PathLike] | os.PathLike] = None,
base: Optional[os.PathLike] = None,
environ: Environment = None,
k: str = None,
) -> List[str]:
return list(self.passing.keys()) + list(self.failing.keys())

Expand Down

0 comments on commit 3a4f40f

Please sign in to comment.