Skip to content
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

fix(translate): fix a broken test #4360

Merged
merged 3 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions translate/automl/dataset_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import datetime
import os
import uuid

import pytest

Expand All @@ -28,7 +28,7 @@
@pytest.mark.slow
def test_dataset_create_import_delete(capsys):
# create dataset
dataset_name = "test_" + datetime.datetime.now().strftime("%Y%m%d%H%M%S")
dataset_name = f"test_{uuid.uuid4().hex[:27]}"
automl_translation_dataset.create_dataset(
project_id, compute_region, dataset_name, "en", "ja"
)
Expand Down
2 changes: 1 addition & 1 deletion translate/automl/model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ def test_model_list_get_evaluate(capsys):
project_id, compute_region, model_id, model_evaluation_id
)
out, _ = capsys.readouterr()
assert "evaluation_metric" in out
assert model_evaluation_id in out