mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
⚗️ stop running tests requiring AYON server by default
this is to ensure test will still run on GH.
This commit is contained in:
parent
0cdbd07114
commit
7b0b5a46ec
3 changed files with 13 additions and 2 deletions
|
|
@ -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",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue