forked from quantumlib/Cirq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import subprocess | ||
import pathlib | ||
import platform | ||
import pytest | ||
|
||
|
||
def test_docker_stable(): | ||
if platform.system() != 'Linux': | ||
pytest.skip("Unsupported os") | ||
root_folder = pathlib.Path(__file__).parent.parent | ||
buildResult = subprocess.run( | ||
['docker', 'build', '--target', 'cirq_stable', '-t', 'cirq_image', '.'], cwd=root_folder | ||
) | ||
assert buildResult.returncode == 0 | ||
|
||
result = subprocess.run( | ||
['docker run cirq_image python -c "import cirq; assert cirq.__version__ is not None"'], | ||
cwd=root_folder, | ||
shell=True, | ||
) | ||
assert result.returncode == 0 | ||
|
||
|
||
def test_docker_pre(): | ||
if platform.system() != 'Linux': | ||
pytest.skip("Unsupported os") | ||
root_folder = pathlib.Path(__file__).parent.parent | ||
buildResult = subprocess.run( | ||
['docker', 'build', '--target', 'cirq_pre_release', '-t', 'cirq_image_pre', '.'], | ||
cwd=root_folder, | ||
) | ||
assert buildResult.returncode == 0 | ||
|
||
result = subprocess.run( | ||
['docker run cirq_image_pre python -c "import cirq; assert cirq.__version__ is not None"'], | ||
cwd=root_folder, | ||
shell=True, | ||
) | ||
assert result.returncode == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters