From e8a9960b7325c2b3c9fa75e0e08861b25e4a37a0 Mon Sep 17 00:00:00 2001 From: boukeversteegh Date: Mon, 25 May 2020 21:11:33 +0200 Subject: [PATCH] Move configuration of test-cases to config file, include list of service tests --- betterproto/tests/README.md | 2 +- betterproto/tests/inputs/{xfail.py => config.py} | 9 +++++++++ betterproto/tests/test_inputs.py | 12 +++--------- 3 files changed, 13 insertions(+), 10 deletions(-) rename betterproto/tests/inputs/{xfail.py => config.py} (60%) diff --git a/betterproto/tests/README.md b/betterproto/tests/README.md index de2e2d2..1892cea 100644 --- a/betterproto/tests/README.md +++ b/betterproto/tests/README.md @@ -87,4 +87,4 @@ betterproto/tests/test_inputs.py ..x...x..x...x.X........xx........x.....x...... - `x` — XFAIL: expected failure - `X` — XPASS: expected failure, but still passed -Test cases marked for expected failure are declared in [inputs/xfail.py](inputs.xfail.py) \ No newline at end of file +Test cases marked for expected failure are declared in [inputs/config.py](inputs/config.py) \ No newline at end of file diff --git a/betterproto/tests/inputs/xfail.py b/betterproto/tests/inputs/config.py similarity index 60% rename from betterproto/tests/inputs/xfail.py rename to betterproto/tests/inputs/config.py index f80f0f4..7b1dbae 100644 --- a/betterproto/tests/inputs/xfail.py +++ b/betterproto/tests/inputs/config.py @@ -6,5 +6,14 @@ tests = { "import_root_package_from_child", "import_parent_package_from_child", "import_circular_dependency", + "import_packages_same_name", "oneof_enum", } + +services = { + "googletypes_response", + "googletypes_response_embedded", + "service", + "import_service_input_message", + "import_service_input_message_dependency", +} diff --git a/betterproto/tests/test_inputs.py b/betterproto/tests/test_inputs.py index 7c7026e..183db25 100644 --- a/betterproto/tests/test_inputs.py +++ b/betterproto/tests/test_inputs.py @@ -8,7 +8,7 @@ from typing import Set import pytest import betterproto -from betterproto.tests.inputs import xfail +from betterproto.tests.inputs import config as test_input_config from betterproto.tests.mocks import MockChannel from betterproto.tests.util import get_directories, get_test_case_json_data, inputs_path @@ -45,14 +45,8 @@ class TestCases: test_cases = TestCases( path=inputs_path, - # test cases for services - services={ - "googletypes_response", - "googletypes_response_embedded", - "service", - "import_service_input_message_dependency", - }, - xfail=xfail.tests, + services=test_input_config.services, + xfail=test_input_config.tests, ) plugin_output_package = "betterproto.tests.output_betterproto"