| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,7 @@ | |||
| 5 | 5 | from kaggle_gcp import KaggleKernelCredentials, init_automl | |
| 6 | 6 | from test.support import EnvironmentVarGuard | |
| 7 | 7 | from google.cloud import storage, automl_v1beta1 as automl | |
| 8 | + from packaging.version import parse | ||
| 8 | 9 | ||
| 9 | 10 | def _make_credentials(): | |
| 10 | 11 | import google.auth.credentials | |
@@ -14,14 +15,7 @@ class TestAutoMl(unittest.TestCase): | |||
| 14 | 15 | ||
| 15 | 16 | def test_version(self): | |
| 16 | 17 | self.assertIsNotNone(automl.auto_ml_client._GAPIC_LIBRARY_VERSION) | |
| 17 | - # follows semver (i.e. major.minor.patch) | ||
| 18 | - version_parts = automl.auto_ml_client._GAPIC_LIBRARY_VERSION.split('.') | ||
| 19 | - self.assertEqual(3, len(version_parts)) | ||
| 20 | - # Ensures that version is >= 0.5 | ||
| 21 | - major = int(version_parts[0]) | ||
| 22 | - minor = int(version_parts[1]) | ||
| 23 | - if major == 0: | ||
| 24 | - self.assertGreaterEqual(minor, 5) | ||
| 18 | + self.assertGreaterEqual(parse(automl.auto_ml_client._GAPIC_LIBRARY_VERSION), parse("0.5.0")) | ||
| 25 | 19 | ||
| 26 | 20 | class FakeClient: | |
| 27 | 21 | def __init__(self, credentials=None, client_info=None, **kwargs): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments