Skip to content
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
2 changes: 2 additions & 0 deletions cirq-core/cirq/vis/heatmap_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""Tests for Heatmap."""

import pathlib
import shutil
import string
from tempfile import mkdtemp

Expand Down Expand Up @@ -309,6 +310,7 @@ def test_colorbar(ax, position, size, pad):

plt.close(fig1)
plt.close(fig2)
shutil.rmtree(tmp_dir)


@pytest.mark.usefixtures('closefigures')
Expand Down
2 changes: 2 additions & 0 deletions dev_tools/cloned_env_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""Tests the cloned_env fixture in conftest.py"""
import json
import os
import shutil
import subprocess
from unittest import mock

Expand All @@ -39,3 +40,4 @@ def test_isolated_env_cloning(cloned_env, param):
packages = json.loads(result.stdout)
assert {"name": "flynt", "version": "0.64"} in packages
assert {"astor", "flynt", "pip", "setuptools", "wheel"} == set(p['name'] for p in packages)
shutil.rmtree(env)
2 changes: 2 additions & 0 deletions dev_tools/notebooks/isolated_notebook_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import os
import re
import subprocess
import shutil
import warnings
from typing import Set, List

Expand Down Expand Up @@ -188,6 +189,7 @@ def _rewrite_and_run_notebook(notebook_path, cloned_env):
f"dev_tools/notebooks/isolated_notebook_test.py."
)
os.remove(rewritten_notebook_path)
shutil.rmtree(notebook_env)


@pytest.mark.slow
Expand Down
2 changes: 2 additions & 0 deletions dev_tools/packaging/isolated_packages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import os
import shutil
import subprocess
from unittest import mock

Expand Down Expand Up @@ -48,3 +49,4 @@ def test_isolated_packages(cloned_env, module):
check=False,
)
assert result.returncode == 0, f"Failed isolated tests for {module.name}:\n{result.stdout}"
shutil.rmtree(env)