-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathtest_integration_test.py
More file actions
24 lines (20 loc) · 955 Bytes
/
test_integration_test.py
File metadata and controls
24 lines (20 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright The Marin Authors
# SPDX-License-Identifier: Apache-2.0
import os
import subprocess
import tempfile
import pytest
@pytest.mark.integration
@pytest.mark.skipif(os.getenv("CI") == "true", reason="Skip this test in CI, since we run it as a separate worflow.")
def test_integration_test_run():
MARIN_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
"""Test the dry runs of experiment scripts"""
# Emulate running tests/integration_test.py on the cmdline
# don't name dir `test` because tokenizer gets mad that you're trying to train on test
with tempfile.TemporaryDirectory(prefix="executor-integration") as temp_dir:
result = subprocess.run(
["python", os.path.join(MARIN_ROOT, "tests/integration_test.py"), "--prefix", temp_dir],
capture_output=False,
text=True,
)
assert result.returncode == 0, f"Integration test run failed: {result.stderr}"