Skip to content

Commit c4aff64

Browse files
authored
Fixing spelling and minor whitespace issues in tests (#1225)
1 parent 1798cf7 commit c4aff64

29 files changed

+86
-84
lines changed

tests/integration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ def drop_keyspace_shutdown_cluster(keyspace_name, session, cluster):
699699
try:
700700
execute_with_long_wait_retry(session, "DROP KEYSPACE {0}".format(keyspace_name))
701701
except:
702-
log.warning("Error encountered when droping keyspace {0}".format(keyspace_name))
702+
log.warning("Error encountered when dropping keyspace {0}".format(keyspace_name))
703703
ex_type, ex, tb = sys.exc_info()
704704
log.warning("{0}: {1} Backtrace: {2}".format(ex_type.__name__, ex, traceback.extract_tb(tb)))
705705
del tb

tests/integration/advanced/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def use_singledc_wth_graph_and_spark(start=True):
8888

8989
def use_cluster_with_graph(num_nodes):
9090
"""
91-
This is a work around to account for the fact that spark nodes will conflict over master assignment
91+
This is a workaround to account for the fact that spark nodes will conflict over master assignment
9292
when started all at once.
9393
"""
9494
if USE_CASS_EXTERNAL:
@@ -125,7 +125,7 @@ def use_cluster_with_graph(num_nodes):
125125

126126
class BasicGeometricUnitTestCase(BasicKeyspaceUnitTestCase):
127127
"""
128-
This base test class is used by all the geomteric tests. It contains class level teardown and setup
128+
This base test class is used by all the geometric tests. It contains class level teardown and setup
129129
methods. It also contains the test fixtures used by those tests
130130
"""
131131

tests/integration/advanced/graph/test_graph_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def _test_range_query(self, schema, graphson):
244244
"""
245245
Test to validate range queries are handled correctly.
246246
247-
Creates a very large line graph script and executes it. Then proceeds to to a range
247+
Creates a very large line graph script and executes it. Then proceeds to a range
248248
limited query against it, and ensure that the results are formatted correctly and that
249249
the result set is properly sized.
250250
@@ -331,7 +331,7 @@ def _test_large_create_script(self, schema, graphson):
331331
@test_category dse graph
332332
"""
333333
self.execute_graph(schema.fixtures.line(150), graphson)
334-
self.execute_graph(schema.fixtures.line(300), graphson) # This should passed since the queries are splitted
334+
self.execute_graph(schema.fixtures.line(300), graphson) # This should pass since the queries are split
335335
self.assertRaises(SyntaxException, self.execute_graph, schema.fixtures.line(300, single_script=True), graphson) # this is not and too big
336336

337337
def _test_large_result_set(self, schema, graphson):

tests/integration/advanced/test_auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class BasicDseAuthTest(unittest.TestCase):
6767
@classmethod
6868
def setUpClass(self):
6969
"""
70-
This will setup the necessary infrastructure to run our authentication tests. It requres the ADS_HOME environment variable
70+
This will setup the necessary infrastructure to run our authentication tests. It requires the ADS_HOME environment variable
7171
and our custom embedded apache directory server jar in order to run.
7272
"""
7373
if not DSE_VERSION:
@@ -86,7 +86,7 @@ def setUpClass(self):
8686
self.charlie_keytab = os.path.join(self.conf_file_dir, "charlie.keytab")
8787
actual_jar = os.path.join(ADS_HOME, "embedded-ads.jar")
8888

89-
# Create configuration directories if they don't already exists
89+
# Create configuration directories if they don't already exist
9090
if not os.path.exists(self.conf_file_dir):
9191
os.makedirs(self.conf_file_dir)
9292
if not os.path.exists(actual_jar):
@@ -175,7 +175,7 @@ def test_should_not_authenticate_with_bad_user_ticket(self):
175175
auth_provider = DSEGSSAPIAuthProvider(service='dse', qops=["auth"])
176176
self.assertRaises(NoHostAvailable, self.connect_and_query, auth_provider)
177177

178-
def test_should_not_athenticate_without_ticket(self):
178+
def test_should_not_authenticate_without_ticket(self):
179179
"""
180180
This tests will attempt to authenticate with a user that is valid but has no ticket
181181
@since 3.20

tests/integration/advanced/test_cont_paging.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ def create_cluster(cls):
7070

7171
cls.select_all_statement = "SELECT * FROM {0}.{0}".format(cls.ks_name)
7272

73-
def test_continous_paging(self):
73+
def test_continuous_paging(self):
7474
"""
7575
Test to ensure that various continuous paging schemes return the full set of results.
7676
@since 3.20
7777
@jira_ticket PYTHON-615
78-
@expected_result various continous paging options should fetch all the results
78+
@expected_result various continuous paging options should fetch all the results
7979
8080
@test_category queries
8181
"""
@@ -131,9 +131,9 @@ def test_paging_cancel(self):
131131
self.session_with_profiles.default_fetch_size = 1
132132
# This combination should fetch one result a second. We should see a very few results
133133
results = self.session_with_profiles.execute_async(self.select_all_statement, execution_profile= "SLOW")
134-
result_set =results.result()
134+
result_set = results.result()
135135
result_set.cancel_continuous_paging()
136-
result_lst =list(result_set)
136+
result_lst = list(result_set)
137137
self.assertLess(len(result_lst), 2, "Cancel should have aborted fetch immediately")
138138

139139
def test_con_paging_verify_writes(self):
@@ -183,7 +183,7 @@ def test_con_paging_verify_writes(self):
183183

184184
def test_can_get_results_when_no_more_pages(self):
185185
"""
186-
Test to validate that the resutls can be fetched when
186+
Test to validate that the results can be fetched when
187187
has_more_pages is False
188188
@since 3.20
189189
@jira_ticket PYTHON-946

tests/integration/advanced/test_geometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class AbstractGeometricTypeTest():
3535

3636
def test_should_insert_simple(self):
3737
"""
38-
This tests will attempt to insert a point, polygon, or line, using simple inline formating.
38+
This tests will attempt to insert a point, polygon, or line, using simple inline formatting.
3939
@since 3.20
4040
@jira_ticket PYTHON-456
4141
@test_category dse geometric

tests/integration/advanced/test_spark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def setup_module():
3030
@requiredse
3131
class SparkLBTests(BasicGraphUnitTestCase):
3232
"""
33-
Test to validate that analtics query can run in a multi-node enviroment. Also check to to ensure
33+
Test to validate that analytics query can run in a multi-node environment. Also check to ensure
3434
that the master spark node is correctly targeted when OLAP queries are run
3535
3636
@since 3.20
@@ -42,7 +42,7 @@ def test_spark_analytic_query(self):
4242
self.session.execute_graph(ClassicGraphFixtures.classic())
4343
spark_master = find_spark_master(self.session)
4444

45-
# Run multipltle times to ensure we don't round robin
45+
# Run multiple times to ensure we don't round-robin
4646
for i in range(3):
4747
to_run = SimpleGraphStatement("g.V().count()")
4848
rs = self.session.execute_graph(to_run, execution_profile=EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT)

tests/integration/cloud/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
from tests.integration.cloud import setup_package, teardown_package
44

5+
56
@pytest.fixture(scope='session', autouse=True)
67
def setup_and_teardown_packages():
78
setup_package()
89
yield
9-
teardown_package()
10+
teardown_package()

tests/integration/cloud/test_cloud_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ def test_for_schema_disagreement_attribute(self):
110110
self.check_and_wait_for_agreement(session, rs, True)
111111
cluster.shutdown()
112112

113-
def check_and_wait_for_agreement(self, session, rs, exepected):
113+
def check_and_wait_for_agreement(self, session, rs, expected):
114114
# Wait for RESULT_KIND_SCHEMA_CHANGE message to arrive
115115
time.sleep(1)
116-
self.assertEqual(rs.response_future.is_schema_agreed, exepected)
116+
self.assertEqual(rs.response_future.is_schema_agreed, expected)
117117
if not rs.response_future.is_schema_agreed:
118118
session.cluster.control_connection.wait_for_schema_agreement(wait_time=1000)

tests/integration/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
from tests.integration import teardown_package
44

5+
56
@pytest.fixture(scope='session', autouse=True)
67
def setup_and_teardown_packages():
78
print('setup')
89
yield
9-
teardown_package()
10+
teardown_package()

0 commit comments

Comments
 (0)