Skip to content

Conversation

juliusgeo
Copy link
Contributor

No description provided.

@@ -181,6 +182,12 @@ def create_tests(test_path):
scenario_def = json.load(scenario_stream)

for testcase in scenario_def['tests']:
if (testcase['uri'].startswith("mongodb+srv") and not
_HAVE_DNSPYTHON):
Copy link
Member

Choose a reason for hiding this comment

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

The code style is off here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. At least I think so.

Copy link
Member

Choose a reason for hiding this comment

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

The indentation is still off.

@@ -181,6 +182,12 @@ def create_tests(test_path):
scenario_def = json.load(scenario_stream)

for testcase in scenario_def['tests']:
if (testcase['uri'].startswith("mongodb+srv") and not
_HAVE_DNSPYTHON):
Copy link
Member

Choose a reason for hiding this comment

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

The indentation is still off.

@@ -181,6 +182,12 @@ def create_tests(test_path):
scenario_def = json.load(scenario_stream)

for testcase in scenario_def['tests']:
if (testcase['uri'].startswith(SRV_SCHEME) and not
Copy link
Member

Choose a reason for hiding this comment

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

Please move this skipping logic to the run_scenario method above and use self.skip(...) instead of print.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@juliusgeo juliusgeo requested a review from ShaneHarvey October 13, 2021 19:23
Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

Please be mindful about formatting.

@@ -92,7 +93,10 @@ def run_scenario(self):
compressors = (test.get('options') or {}).get('compressors', [])
if 'snappy' in compressors and not _HAVE_SNAPPY:
self.skipTest('This test needs the snappy module.')

if (test['uri'].startswith(SRV_SCHEME) and not
_HAVE_DNSPYTHON):
Copy link
Member

Choose a reason for hiding this comment

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

This should be one line now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

if (test['uri'].startswith(SRV_SCHEME) and not
_HAVE_DNSPYTHON):
self.skipTest("Skipping test '%s' because you need DNSPython for "
"mongodb+srv URIs" % dsc)
Copy link
Member

Choose a reason for hiding this comment

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

Indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

LGTM assuming the tests pass. Can you schedule one of the failing tasks?

@juliusgeo juliusgeo merged commit d77c204 into mongodb:master Oct 13, 2021
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 5, 2022
juliusgeo added a commit to juliusgeo/mongo-python-driver that referenced this pull request Apr 7, 2022
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