Skip to content

fix tests with incorrect region-skipping code #537

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

Merged
merged 6 commits into from
Dec 9, 2018

Conversation

jesterhazy
Copy link
Contributor

Description of changes:

fix incorrect region-skipping code

region in test.integ.REGION diverges from sagemaker_session region in several test contexts. this made the region-skipping test marks not work correctly.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

codecov-io commented Dec 8, 2018

Codecov Report

Merging #537 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #537   +/-   ##
=======================================
  Coverage   92.77%   92.77%           
=======================================
  Files          71       71           
  Lines        5357     5357           
=======================================
  Hits         4970     4970           
  Misses        387      387

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b3ab50...b3bfd66. Read the comment docs.

@jesterhazy jesterhazy mentioned this pull request Dec 9, 2018
4 tasks
@jesterhazy jesterhazy changed the title fix incorrect region-skipping code fix tests with incorrect region-skipping code Dec 9, 2018
@@ -64,10 +75,13 @@ def boto_config(request):

@pytest.fixture(scope='session')
def sagemaker_session(sagemaker_client_config, sagemaker_runtime_config, boto_config):
boto_session = boto3.Session(**boto_config) if boto_config else boto3.Session(region_name=DEFAULT_REGION)
boto_session = boto3.Session(**boto_config) if boto_config else boto3.Session(
region_name=DEFAULT_REGION)
Copy link
Contributor

Choose a reason for hiding this comment

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

not in scope of this PR, but seeing this and scanning through conftest.py makes me think we should make a boto_session fixture

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree, there should be another PR for this.

parser.addoption('--sklearn-full-version', action='store', default=SKLEARN_VERSION)
parser.addoption('--tf-full-version', action='store', default=TF_VERSION)


def pytest_configure(config):
Copy link
Contributor

Choose a reason for hiding this comment

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

can this go in conftest.py or __init__.py instead of individual test files or is there a reason it's specific to this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it must be in this file for pytest to call it (and set the env var) at the correct time. stuff in init.py doesn't have access to the pytest config (part of the original problem).

@jesterhazy jesterhazy merged commit 3b7cbd4 into aws:master Dec 9, 2018
@jesterhazy jesterhazy deleted the je-tf-test branch December 9, 2018 21:27
metrizable pushed a commit to metrizable/sagemaker-python-sdk that referenced this pull request Dec 1, 2020
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.

3 participants