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

Remove is <int> #403

Merged
merged 1 commit into from
Jan 5, 2025
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
6 changes: 3 additions & 3 deletions tests/integration/cqlengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def wrapped_function(*args, **kwargs):
# DeMonkey Patch our code
cassandra.cqlengine.connection.execute = original_function
# Check to see if we have a pre-existing test case to work from.
if len(args) is 0:
test_case = unittest.TestCase("__init__")
else:
if args:
test_case = args[0]
else:
test_case = unittest.TestCase("__init__")
# Check to see if the count is what you expect
test_case.assertEqual(count.get_counter(), expected, msg="Expected number of cassandra.cqlengine.connection.execute calls ({0}) doesn't match actual number invoked ({1})".format(expected, count.get_counter()))
return to_return
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/cqlengine/query/test_queryoperators.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,6 @@ def test_named_table_pk_token_function(self):
query = named.all().limit(1)
first_page = list(query)
last = first_page[-1]
self.assertTrue(len(first_page) is 1)
self.assertTrue(len(first_page) == 1)
next_page = list(query.filter(pk__token__gt=functions.Token(last.key)))
self.assertTrue(len(next_page) is 1)
self.assertTrue(len(next_page) == 1)
4 changes: 2 additions & 2 deletions tests/integration/standard/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def wait_for_connections(self, host, cluster):
while(retry < 300):
retry += 1
connections = self.fetch_connections(host, cluster)
if len(connections) is not 0:
if connections:
return connections
time.sleep(.1)
self.fail("No new connections found")
Expand All @@ -192,7 +192,7 @@ def wait_for_no_connections(self, host, cluster):
while(retry < 100):
retry += 1
connections = self.fetch_connections(host, cluster)
if len(connections) is 0:
if not connections:
return
time.sleep(.5)
self.fail("Connections never cleared")
Expand Down
Loading