Skip to content

Commit

Permalink
chore: updates so tests can run in different environments (#1403)
Browse files Browse the repository at this point in the history
  • Loading branch information
sararob authored Jun 1, 2022
1 parent 3047e29 commit 15fe100
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from test_models import upload_model_mock, get_model_mock # noqa: F401


@pytest.mark.usefixtures("google_auth_mock")
class SavedModelMetadataBuilderTF1Test(tf.test.TestCase):
def _set_up(self):
self.sess = tf.Session(graph=tf.Graph())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from test_models import upload_model_mock, get_model_mock # noqa: F401


@pytest.mark.usefixtures("google_auth_mock")
class SavedModelMetadataBuilderTF2Test(tf.test.TestCase):
def _set_up_sequential(self):
# Set up for the sequential.
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/aiplatform/test_training_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ def mock_get_backing_custom_job_with_enable_web_access():
yield get_custom_job_mock


@pytest.mark.skipif(
sys.executable is None, reason="requires python path to invoke subprocess"
)
@pytest.mark.usefixtures("google_auth_mock")
class TestTrainingScriptPythonPackagerHelpers:
def setup_method(self):
Expand Down Expand Up @@ -446,6 +449,9 @@ def test_get_python_executable_returns_python_executable(self):
assert "python" in source_utils._get_python_executable().lower()


@pytest.mark.skipif(
sys.executable is None, reason="requires python path to invoke subprocess"
)
@pytest.mark.usefixtures("google_auth_mock")
class TestTrainingScriptPythonPackager:
def setup_method(self):
Expand Down

0 comments on commit 15fe100

Please sign in to comment.