Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c848ceb

Browse files
Lorak-mmkdkropachev
authored andcommitted
Replace assert_startswith with plain assert
1 parent c2cb8a5 commit c848ceb

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

‎tests/integration/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -944,13 +944,6 @@ def tearDown(self):
944944
self.cluster.shutdown()
945945

946946

947-
def assert_startswith(s, prefix):
948-
if not s.startswith(prefix):
949-
raise AssertionError(
950-
'{} does not start with {}'.format(repr(s), repr(prefix))
951-
)
952-
953-
954947
class TestCluster(object):
955948
__test__ = False
956949

‎tests/integration/standard/test_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
BasicExistingKeyspaceUnitTestCase, drop_keyspace_shutdown_cluster, CASSANDRA_VERSION,
4040
greaterthanorequalcass30, lessthancass30, local,
4141
get_supported_protocol_versions, greaterthancass20,
42-
greaterthancass21, assert_startswith, greaterthanorequalcass40,
42+
greaterthancass21, greaterthanorequalcass40,
4343
lessthancass40,
4444
TestCluster, requires_java_udf, requires_composite_type,
4545
requires_collection_indexes, SCYLLA_VERSION, xfail_scylla, xfail_scylla_version_lt,
@@ -105,7 +105,7 @@ def test_host_release_version(self):
105105
@test_category metadata
106106
"""
107107
for host in self.cluster.metadata.all_hosts():
108-
assert_startswith(host.release_version, CASSANDRA_VERSION.base_version)
108+
asserthost.release_version.startswith(CASSANDRA_VERSION.base_version)
109109

110110

111111

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /