From 47262979168e70f6880d5f196072fb914e5de136 Mon Sep 17 00:00:00 2001 From: Patrick Huck Date: Tue, 3 Sep 2024 17:36:09 -0700 Subject: [PATCH] use "not logs" instead of "logs is None" see https://github.com/plotly/dash/issues/2712 --- crystal_toolkit/apps/examples/tests/test_bandstructure.py | 2 +- crystal_toolkit/apps/examples/tests/test_basic.py | 6 +++--- crystal_toolkit/apps/examples/tests/test_diffraction.py | 2 +- crystal_toolkit/apps/examples/tests/test_fermi_surface.py | 2 +- crystal_toolkit/apps/examples/tests/test_structure.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crystal_toolkit/apps/examples/tests/test_bandstructure.py b/crystal_toolkit/apps/examples/tests/test_bandstructure.py index 7a3777bd..a22b4a91 100644 --- a/crystal_toolkit/apps/examples/tests/test_bandstructure.py +++ b/crystal_toolkit/apps/examples/tests/test_bandstructure.py @@ -32,4 +32,4 @@ def test_bs(dash_duo: DashDuo) -> None: # dash_duo.percy_snapshot("example_bsdos_projection_index_2") logs = dash_duo.get_logs() - assert logs is None, f"Unexpected browser {logs=}" + assert not logs, f"Unexpected browser {logs=}" diff --git a/crystal_toolkit/apps/examples/tests/test_basic.py b/crystal_toolkit/apps/examples/tests/test_basic.py index bac726d2..7429fc44 100644 --- a/crystal_toolkit/apps/examples/tests/test_basic.py +++ b/crystal_toolkit/apps/examples/tests/test_basic.py @@ -22,7 +22,7 @@ def test_hello_scientist(dash_duo: DashDuo): dash_duo.percy_snapshot("hello_scientist") logs = dash_duo.get_logs() - assert logs is None, f"Unexpected browser {logs=}" + assert not logs, f"Unexpected browser {logs=}" def test_hello_structure(dash_duo: DashDuo) -> None: @@ -33,7 +33,7 @@ def test_hello_structure(dash_duo: DashDuo) -> None: dash_duo.percy_snapshot("hello_structure") logs = dash_duo.get_logs() - assert logs is None, f"Unexpected browser {logs=}" + assert not logs, f"Unexpected browser {logs=}" def test_hello_structure_interactive(dash_duo: DashDuo) -> None: @@ -47,4 +47,4 @@ def test_hello_structure_interactive(dash_duo: DashDuo) -> None: dash_duo.percy_snapshot("hello_structure_interactive_on_click") logs = dash_duo.get_logs() - assert logs is None, f"Unexpected browser {logs=}" + assert not logs, f"Unexpected browser {logs=}" diff --git a/crystal_toolkit/apps/examples/tests/test_diffraction.py b/crystal_toolkit/apps/examples/tests/test_diffraction.py index eb167b24..bb9935f9 100644 --- a/crystal_toolkit/apps/examples/tests/test_diffraction.py +++ b/crystal_toolkit/apps/examples/tests/test_diffraction.py @@ -31,4 +31,4 @@ def test_diffraction(dash_duo: DashDuo) -> None: input_nodes[0].send_keys(Keys.ARROW_UP) logs = dash_duo.get_logs() - assert logs is None, f"Unexpected browser {logs=}" + assert not logs, f"Unexpected browser {logs=}" diff --git a/crystal_toolkit/apps/examples/tests/test_fermi_surface.py b/crystal_toolkit/apps/examples/tests/test_fermi_surface.py index 530a87e7..bc86792d 100644 --- a/crystal_toolkit/apps/examples/tests/test_fermi_surface.py +++ b/crystal_toolkit/apps/examples/tests/test_fermi_surface.py @@ -17,4 +17,4 @@ def test_diffraction(dash_duo: DashDuo) -> None: assert "dash-graph" in node.get_attribute("class") logs = dash_duo.get_logs() - assert logs is None, f"Unexpected browser {logs=}" + assert not logs, f"Unexpected browser {logs=}" diff --git a/crystal_toolkit/apps/examples/tests/test_structure.py b/crystal_toolkit/apps/examples/tests/test_structure.py index c54fa77c..0fc7e51c 100644 --- a/crystal_toolkit/apps/examples/tests/test_structure.py +++ b/crystal_toolkit/apps/examples/tests/test_structure.py @@ -36,4 +36,4 @@ def test_structure(dash_duo: DashDuo) -> None: sleep(1) logs = dash_duo.get_logs() - assert logs is None, f"Unexpected browser {logs=}" + assert not logs, f"Unexpected browser {logs=}"