Skip to content

Commit e8a9960

Browse files
Move configuration of test-cases to config file, include list of service tests
1 parent f25c667 commit e8a9960

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

betterproto/tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ betterproto/tests/test_inputs.py ..x...x..x...x.X........xx........x.....x......
8787
- `x` — XFAIL: expected failure
8888
- `X` — XPASS: expected failure, but still passed
8989

90-
Test cases marked for expected failure are declared in [inputs/xfail.py](inputs.xfail.py)
90+
Test cases marked for expected failure are declared in [inputs/config.py](inputs/config.py)

betterproto/tests/inputs/xfail.py renamed to betterproto/tests/inputs/config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,14 @@
66
"import_root_package_from_child",
77
"import_parent_package_from_child",
88
"import_circular_dependency",
9+
"import_packages_same_name",
910
"oneof_enum",
1011
}
12+
13+
services = {
14+
"googletypes_response",
15+
"googletypes_response_embedded",
16+
"service",
17+
"import_service_input_message",
18+
"import_service_input_message_dependency",
19+
}

betterproto/tests/test_inputs.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
import betterproto
11-
from betterproto.tests.inputs import xfail
11+
from betterproto.tests.inputs import config as test_input_config
1212
from betterproto.tests.mocks import MockChannel
1313
from betterproto.tests.util import get_directories, get_test_case_json_data, inputs_path
1414

@@ -45,14 +45,8 @@ def apply_xfail_marks(test_set: Set[str], xfail: Set[str]):
4545

4646
test_cases = TestCases(
4747
path=inputs_path,
48-
# test cases for services
49-
services={
50-
"googletypes_response",
51-
"googletypes_response_embedded",
52-
"service",
53-
"import_service_input_message_dependency",
54-
},
55-
xfail=xfail.tests,
48+
services=test_input_config.services,
49+
xfail=test_input_config.tests,
5650
)
5751

5852
plugin_output_package = "betterproto.tests.output_betterproto"

0 commit comments

Comments
 (0)