GeezerVison is showing github.com — chore: updates so tests can run in different environments (#1403) · googleapis/python-aiplatform@15fe100
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tests/unit/aiplatform/test_explain_saved_model_metadata_builder_tf1_test.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
26 | 26 | from test_models import upload_model_mock, get_model_mock # noqa: F401 |
27 | 27 |
|
28 | 28 |
|
| 29 | +@pytest.mark.usefixtures("google_auth_mock") |
29 | 30 | class SavedModelMetadataBuilderTF1Test(tf.test.TestCase): |
30 | 31 | def _set_up(self): |
31 | 32 | self.sess = tf.Session(graph=tf.Graph()) |
|
Collapse file
Copy file name to clipboardExpand all lines: tests/unit/aiplatform/test_explain_saved_model_metadata_builder_tf2_test.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
27 | 27 | from test_models import upload_model_mock, get_model_mock # noqa: F401 |
28 | 28 |
|
29 | 29 |
|
| 30 | +@pytest.mark.usefixtures("google_auth_mock") |
30 | 31 | class SavedModelMetadataBuilderTF2Test(tf.test.TestCase): |
31 | 32 | def _set_up_sequential(self): |
32 | 33 | # Set up for the sequential. |
|
Collapse file
Copy file name to clipboardExpand all lines: tests/unit/aiplatform/test_training_jobs.py +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -330,6 +330,9 @@ def mock_get_backing_custom_job_with_enable_web_access(): |
330 | 330 | yield get_custom_job_mock |
331 | 331 |
|
332 | 332 |
|
| 333 | +@pytest.mark.skipif( |
| 334 | + sys.executable is None, reason="requires python path to invoke subprocess" |
| 335 | +) |
333 | 336 | @pytest.mark.usefixtures("google_auth_mock") |
334 | 337 | class TestTrainingScriptPythonPackagerHelpers: |
335 | 338 | def setup_method(self): |
@@ -446,6 +449,9 @@ def test_get_python_executable_returns_python_executable(self): |
446 | 449 | assert "python" in source_utils._get_python_executable().lower() |
447 | 450 |
|
448 | 451 |
|
| 452 | +@pytest.mark.skipif( |
| 453 | + sys.executable is None, reason="requires python path to invoke subprocess" |
| 454 | +) |
449 | 455 | @pytest.mark.usefixtures("google_auth_mock") |
450 | 456 | class TestTrainingScriptPythonPackager: |
451 | 457 | def setup_method(self): |
|