⚗️ stop running tests requiring AYON server by default

this is to ensure test will still run on GH.
This commit is contained in:
Ondřej Samohel 2025-04-16 12:23:56 +02:00
parent 0cdbd07114
commit 7b0b5a46ec
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
3 changed files with 13 additions and 2 deletions

View file

@ -152,3 +152,11 @@ addopts = "-ra -q"
testpaths = [
"client/ayon_core/tests"
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"api: API tests",
"cli: CLI tests",
"slow: Slow tests",
"server: Tests that require a running AYON server",
]

View file

@ -76,7 +76,6 @@ def sequence_files(tmp_path_factory: pytest.TempPathFactory) -> list[Path]:
def mock_context(
project: pytest_ayon.ProjectInfo,
single_file: Path,
folder_path: Path,
sequence_files: list[Path]) -> pyblish.api.Context:
"""Return a mock instance.
@ -237,6 +236,7 @@ def mock_context(
return context
@pytest.mark.server
def test_get_template_name(mock_context: pyblish.api.Context) -> None:
"""Test get_template_name.
@ -355,6 +355,7 @@ def test_filter_lifecycle() -> None:
assert filtered[0] == persistent_representation
@pytest.mark.server
def test_prepare_product(
project: pytest_ayon.ProjectInfo,
mock_context: pyblish.api.Context) -> None:
@ -375,6 +376,7 @@ def test_prepare_product(
}
@pytest.mark.server
def test_prepare_version(
project: pytest_ayon.ProjectInfo,
mock_context: pyblish.api.Context) -> None:
@ -403,6 +405,7 @@ def test_prepare_version(
}
@pytest.mark.server
def test_get_transfers_from_representation(
mock_context: pyblish.api.Context) -> None:
"""Test get_transfers_from_representation.

View file

@ -242,7 +242,7 @@ function Run-From-Code {
function Run-Tests {
$Poetry = "$RepoRoot\.poetry\bin\poetry.exe"
$RunArgs = @( "run", "pytest", "$($RepoRoot)/tests")
$RunArgs = @( "run", "pytest", "$($RepoRoot)/tests", "-m", "not server")
& $Poetry $RunArgs @arguments
}