Skip to content

Commit

Permalink
fix: lint tests with ruff py311
Browse files Browse the repository at this point in the history
  • Loading branch information
svidiella committed Feb 28, 2024
1 parent 86b7ded commit 501f4d3
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions libs/vertexai/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
_LONG_FLAG = "long"
_EXTENDED_FLAG = "extended"

_PYTEST_FLAGS = [
_RELEASE_FLAG,
_GPU_FLAG,
_LONG_FLAG,
_EXTENDED_FLAG
]
_PYTEST_FLAGS = [_RELEASE_FLAG, _GPU_FLAG, _LONG_FLAG, _EXTENDED_FLAG]


def pytest_addoption(parser: pytest.Parser) -> None:
Expand All @@ -31,10 +26,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
"""
for flag in _PYTEST_FLAGS:
parser.addoption(
f"--{flag}",
action="store_true",
default=False,
help=f"run {flag} tests"
f"--{flag}", action="store_true", default=False, help=f"run {flag} tests"
)


Expand All @@ -49,14 +41,12 @@ def pytest_configure(config: pytest.Config) -> None:
"""
for flag in _PYTEST_FLAGS:
config.addinivalue_line(
"markers",
f"{flag}: mark test to run as {flag} only test"
"markers", f"{flag}: mark test to run as {flag} only test"
)


def pytest_collection_modifyitems(
config: pytest.Config,
items: List[pytest.Item]
config: pytest.Config, items: List[pytest.Item]
) -> None:
"""
Skip tests with a marker from our list that were not explicitly invoked.
Expand Down

0 comments on commit 501f4d3

Please sign in to comment.