Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix small issues in tests #242

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@ def _id_and_mark(f):
# 1. unittest doesn't skip setUpClass when used on class and we need it sometimes
# 2. unittest doesn't have conditional xfail, and I prefer to use pytest than custom decorator
# 3. unittest doesn't have a reason argument, so you don't see the reason in pytest report
requires_collection_indexes = pytest.mark.xfail(SCYLLA_VERSION is not None and Version(SCYLLA_VERSION.split(':')[1]) < Version('5.2'),
requires_collection_indexes = pytest.mark.skipif(SCYLLA_VERSION is not None and Version(SCYLLA_VERSION.split(':')[1]) < Version('5.2'),
reason='Scylla supports collection indexes from 5.2 onwards')
requires_custom_indexes = pytest.mark.xfail(SCYLLA_VERSION is not None,
requires_custom_indexes = pytest.mark.skipif(SCYLLA_VERSION is not None,
reason='Scylla does not support SASI or any other CUSTOM INDEX class')
requires_java_udf = pytest.mark.xfail(SCYLLA_VERSION is not None,
requires_java_udf = pytest.mark.skipif(SCYLLA_VERSION is not None,
reason='Scylla does not support UDFs written in Java')
requires_composite_type = pytest.mark.xfail(SCYLLA_VERSION is not None,
requires_composite_type = pytest.mark.skipif(SCYLLA_VERSION is not None,
reason='Scylla does not support composite types')
requires_custom_payload = pytest.mark.xfail(SCYLLA_VERSION is not None or PROTOCOL_VERSION < 4,
requires_custom_payload = pytest.mark.skipif(SCYLLA_VERSION is not None or PROTOCOL_VERSION < 4,
reason='Scylla does not support custom payloads. Cassandra requires native protocol v4.0+')
xfail_scylla = lambda reason, *args, **kwargs: pytest.mark.xfail(SCYLLA_VERSION is not None, reason=reason, *args, **kwargs)
incorrect_test = lambda reason='This test seems to be incorrect and should be fixed', *args, **kwargs: pytest.mark.xfail(reason=reason, *args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/advanced/test_adv_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
if DSE_VERSION:
super(FunctionAndAggregateMetadataTests, cls).setUpClass()
super(FunctionAndAggregateMetadataTests, cls).tearDownClass()

def setUp(self):
self.func_name = self.function_table_name + '_func'
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/standard/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ def test_index_follows_alter(self):
self.assertIsInstance(table_meta.indexes[idx], IndexMetadata)
self.drop_basic_table()


@requires_java_udf
class FunctionTest(unittest.TestCase):
"""
Base functionality for Function and Aggregate metadata test classes
Expand Down
Loading