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

Run unit tests without affecting browser session #6333

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions cirq-web/cirq_web/widget_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
from pathlib import Path
from unittest import mock

import cirq_web


Expand Down Expand Up @@ -50,6 +53,7 @@ def test_repr_html(tmpdir):
assert remove_whitespace(expected) == remove_whitespace(actual)


@mock.patch.dict(os.environ, {"BROWSER": "true"})
def test_generate_html_file_with_browser(tmpdir):
# # Reset the path so the files are accessible
cirq_web.widget._DIST_PATH = Path(tmpdir) / "dir"
Expand Down