Skip to content

Added tests for PYTHON-839#850

Merged
beltran merged 1 commit into
masterfrom
python-839-tests
Nov 1, 2017
Merged

Added tests for PYTHON-839#850
beltran merged 1 commit into
masterfrom
python-839-tests

Conversation

@beltran
Copy link
Copy Markdown
Contributor

@beltran beltran commented Oct 31, 2017

No description provided.

@beltran beltran requested a review from mambocab October 31, 2017 20:10
Comment thread tests/integration/__init__.py Outdated
def set_default_beta_flag_true():
defaults = list(Cluster.__init__.__defaults__)
defaults = defaults[:-3] + [True] + defaults[-2:]
defaults = defaults[:-4] + [True] + defaults[-3:]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can future-proof this a little better with

defaults[:27] + [True] + defaults[28:]:

In [1]: from cassandra.cluster import Cluster

In [2]: defaults = list(Cluster.__init__.__defaults__)

In [3]: (defaults[:-4] + [True] + defaults[-3:]) == (defaults[:27] + [True] + defaults[28:])
Out[3]: True

Copy link
Copy Markdown
Contributor

@mambocab mambocab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comment is just a small improvement. No hurry for it; we can change it later. Feel free to merge as-is if you want 👍

@beltran beltran merged commit afb475b into master Nov 1, 2017
@beltran beltran deleted the python-839-tests branch November 1, 2017 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants