Skip to content

Commit 2e8af31

Browse files
committed
Split tests
Signed-off-by: Steffen Pankratz <steffen.pankratz@exasol.com>
1 parent 9c13247 commit 2e8af31

2 files changed

Lines changed: 30 additions & 24 deletions

File tree

test/integration/pytest_slc_test.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
import pytest
44
from exasol.pytest_backend import (
55
BACKEND_ALL,
6-
BACKEND_ONPREM,
76
BACKEND_OPTION,
87
)
98

10-
from exasol.pytest_slc import SKIP_SLC_OPTION
11-
129
pytest_plugins = ["pytester"]
1310

1411
MAIN_LANGUAGE_ALIAS = "PYTHON3_PYTEST_SLC"
@@ -54,20 +51,6 @@ def test_deploy_slc(deploy_slc, deployed_slc, backend_aware_database_params):
5451
assert_udf_running(pyexasol.connect(**backend_aware_database_params), lang_alias)
5552
""")
5653

57-
_test_code_skip = dedent(rf"""
58-
import pytest
59-
from exasol.python_extension_common.deployment.language_container_builder import (
60-
LanguageContainerBuilder)
61-
62-
@pytest.fixture(scope='session')
63-
def slc_builder() -> LanguageContainerBuilder:
64-
with LanguageContainerBuilder('test_container') as container_builder:
65-
yield container_builder
66-
67-
def test_deploy_slc_skipped(export_slc):
68-
assert export_slc is None
69-
""")
70-
7154

7255
def test_pytest_slc(pytester):
7356
pytester.makepyfile(_test_code)
@@ -76,10 +59,3 @@ def test_pytest_slc(pytester):
7659
)
7760
assert result.ret == pytest.ExitCode.OK
7861
result.assert_outcomes(passed=2, skipped=0)
79-
80-
81-
def test_pytest_slc_skip(pytester):
82-
pytester.makepyfile(_test_code_skip)
83-
result = pytester.runpytest(BACKEND_OPTION, BACKEND_ONPREM, SKIP_SLC_OPTION)
84-
assert result.ret == pytest.ExitCode.OK
85-
result.assert_outcomes(passed=1, skipped=0)

test/integration/skip_test.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from textwrap import dedent
2+
3+
import pytest
4+
from exasol.pytest_backend import (
5+
BACKEND_ONPREM,
6+
BACKEND_OPTION,
7+
)
8+
9+
from exasol.pytest_slc import SKIP_SLC_OPTION
10+
11+
_test_code_skip = dedent(rf"""
12+
import pytest
13+
from exasol.python_extension_common.deployment.language_container_builder import (
14+
LanguageContainerBuilder)
15+
16+
@pytest.fixture(scope='session')
17+
def slc_builder() -> LanguageContainerBuilder:
18+
with LanguageContainerBuilder('test_container') as container_builder:
19+
yield container_builder
20+
21+
def test_deploy_slc_skipped(export_slc):
22+
assert export_slc is None
23+
""")
24+
25+
26+
def test_pytest_slc_skip(pytester):
27+
pytester.makepyfile(_test_code_skip)
28+
result = pytester.runpytest(BACKEND_OPTION, BACKEND_ONPREM, SKIP_SLC_OPTION)
29+
assert result.ret == pytest.ExitCode.OK
30+
result.assert_outcomes(passed=1, skipped=0)

0 commit comments

Comments
 (0)