From 184886a7ab1d2bada599eaae94722615248d79ba Mon Sep 17 00:00:00 2001 From: Hans Kallekleiv <16436291+HansKallekleiv@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:06:27 +0100 Subject: [PATCH] Fix integration tests (#1265) * remove flaky and fix test assertion --- setup.py | 1 - tests/integration_tests/plugin_tests/test_bhp_qc.py | 2 +- tests/integration_tests/plugin_tests/test_history_match.py | 2 +- tests/integration_tests/plugin_tests/test_line_plotter_fmu.py | 2 +- .../plugin_tests/test_parameter_correlation.py | 2 +- .../plugin_tests/test_parameter_distribution.py | 2 +- .../plugin_tests/test_parameter_parallel_coordinates.py | 2 +- .../plugin_tests/test_parameter_response_correlation.py | 2 +- tests/integration_tests/plugin_tests/test_pvt_plot.py | 2 +- .../plugin_tests/test_relative_permeability.py | 2 +- .../test_reservoir_simulation_timeseries_onebyone.py | 2 +- .../test_reservoir_simulation_timeseries_regional.py | 2 +- tests/integration_tests/plugin_tests/test_rft_plotter.py | 2 +- tests/integration_tests/plugin_tests/test_segy_viewer.py | 2 +- .../plugin_tests/test_structural_uncertainty.py | 2 +- tests/integration_tests/plugin_tests/test_surface_viewer_fmu.py | 2 +- .../plugin_tests/test_surface_with_grid_crossection.py | 2 +- .../plugin_tests/test_surface_with_seismic_crossection.py | 2 +- .../integration_tests/plugin_tests/test_tornado_plotter_fmu.py | 2 +- tests/integration_tests/plugin_tests/test_vfp_analysis.py | 2 +- tests/integration_tests/plugin_tests/test_well_log_viewer.py | 2 +- 21 files changed, 20 insertions(+), 21 deletions(-) diff --git a/setup.py b/setup.py index acdfcbb77..ffdd0f270 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,6 @@ "bandit", "black>=22.1,<24", "dash[testing]", - "flaky", "isort", "mypy", "pylint<=2.13.9", # Locked due to https://github.com/equinor/webviz-subsurface/issues/1052 diff --git a/tests/integration_tests/plugin_tests/test_bhp_qc.py b/tests/integration_tests/plugin_tests/test_bhp_qc.py index e4ed0898a..5840f0626 100644 --- a/tests/integration_tests/plugin_tests/test_bhp_qc.py +++ b/tests/integration_tests/plugin_tests/test_bhp_qc.py @@ -9,4 +9,4 @@ def test_bhp_qc(_webviz_duo: WebvizComposite, shared_settings: dict) -> None: ) _webviz_duo.start_server(plugin) - assert _webviz_duo.get_logs() is None + assert not _webviz_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_history_match.py b/tests/integration_tests/plugin_tests/test_history_match.py index 3d52daa8c..52b3be711 100644 --- a/tests/integration_tests/plugin_tests/test_history_match.py +++ b/tests/integration_tests/plugin_tests/test_history_match.py @@ -15,4 +15,4 @@ def test_history_match(dash_duo, app, testdata_folder, shared_settings) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_line_plotter_fmu.py b/tests/integration_tests/plugin_tests/test_line_plotter_fmu.py index 2f743389a..a5c9ba697 100644 --- a/tests/integration_tests/plugin_tests/test_line_plotter_fmu.py +++ b/tests/integration_tests/plugin_tests/test_line_plotter_fmu.py @@ -26,4 +26,4 @@ def test_line_plotter_fmu(dash_duo, app, testdata_folder, shared_settings) -> No ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_parameter_correlation.py b/tests/integration_tests/plugin_tests/test_parameter_correlation.py index bedfc618d..4b75d2b69 100644 --- a/tests/integration_tests/plugin_tests/test_parameter_correlation.py +++ b/tests/integration_tests/plugin_tests/test_parameter_correlation.py @@ -22,4 +22,4 @@ def test_parameter_correlation(_webviz_duo: WebvizComposite, shared_settings) -> "paracorr", "settings", "shared-ensemble" ) _webviz_duo.wait_for_contains_text(my_component_id, "iter-0") - assert _webviz_duo.get_logs() is None + assert not _webviz_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_parameter_distribution.py b/tests/integration_tests/plugin_tests/test_parameter_distribution.py index 337fc5bf4..d653d6fff 100644 --- a/tests/integration_tests/plugin_tests/test_parameter_distribution.py +++ b/tests/integration_tests/plugin_tests/test_parameter_distribution.py @@ -10,4 +10,4 @@ def test_parameter_distribution(dash_duo, app, shared_settings) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_parameter_parallel_coordinates.py b/tests/integration_tests/plugin_tests/test_parameter_parallel_coordinates.py index a26faeda5..f0597122d 100644 --- a/tests/integration_tests/plugin_tests/test_parameter_parallel_coordinates.py +++ b/tests/integration_tests/plugin_tests/test_parameter_parallel_coordinates.py @@ -10,4 +10,4 @@ def test_parameter_parallel_coordinates(dash_duo, app, shared_settings) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_parameter_response_correlation.py b/tests/integration_tests/plugin_tests/test_parameter_response_correlation.py index 36e6895b7..97d8d61b5 100644 --- a/tests/integration_tests/plugin_tests/test_parameter_response_correlation.py +++ b/tests/integration_tests/plugin_tests/test_parameter_response_correlation.py @@ -12,4 +12,4 @@ def test_parameter_response_correlation(dash_duo, app, shared_settings) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_pvt_plot.py b/tests/integration_tests/plugin_tests/test_pvt_plot.py index 511f793af..29a73b5ed 100644 --- a/tests/integration_tests/plugin_tests/test_pvt_plot.py +++ b/tests/integration_tests/plugin_tests/test_pvt_plot.py @@ -12,4 +12,4 @@ def test_pvt_plot(_webviz_duo: WebvizComposite, shared_settings: dict) -> None: _webviz_duo.start_server(plugin) - assert _webviz_duo.get_logs() is None + assert not _webviz_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_relative_permeability.py b/tests/integration_tests/plugin_tests/test_relative_permeability.py index 7865579e6..2dddda5cb 100644 --- a/tests/integration_tests/plugin_tests/test_relative_permeability.py +++ b/tests/integration_tests/plugin_tests/test_relative_permeability.py @@ -11,4 +11,4 @@ def test_relative_permeability(dash_duo, app, shared_settings) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_onebyone.py b/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_onebyone.py index ec24a7bac..698a205f7 100644 --- a/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_onebyone.py +++ b/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_onebyone.py @@ -13,4 +13,4 @@ def test_reservoir_simulation_timeseries_onebyone( ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_regional.py b/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_regional.py index 831d1a7f0..f4d740fda 100644 --- a/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_regional.py +++ b/tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_regional.py @@ -20,4 +20,4 @@ def test_reservoir_simulation_timeseries_regional( ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_rft_plotter.py b/tests/integration_tests/plugin_tests/test_rft_plotter.py index c3e424c3c..6019ce698 100644 --- a/tests/integration_tests/plugin_tests/test_rft_plotter.py +++ b/tests/integration_tests/plugin_tests/test_rft_plotter.py @@ -40,4 +40,4 @@ def test_rft_plotter( "map-view", "map-settings", "map-ensemble" ) _webviz_duo.wait_for_contains_text(my_component_id, "iter-0") - assert _webviz_duo.get_logs() is None + assert not _webviz_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_segy_viewer.py b/tests/integration_tests/plugin_tests/test_segy_viewer.py index 3365eb462..d867ac5e0 100644 --- a/tests/integration_tests/plugin_tests/test_segy_viewer.py +++ b/tests/integration_tests/plugin_tests/test_segy_viewer.py @@ -19,4 +19,4 @@ def test_segy_viewer(dash_duo, app, shared_settings, testdata_folder) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_structural_uncertainty.py b/tests/integration_tests/plugin_tests/test_structural_uncertainty.py index 2b8ff16e1..0b10f5546 100644 --- a/tests/integration_tests/plugin_tests/test_structural_uncertainty.py +++ b/tests/integration_tests/plugin_tests/test_structural_uncertainty.py @@ -116,7 +116,7 @@ def test_default_configuration(dash_duo, app, testdata_folder) -> None: real_selector = dash_duo.wait_for_element_by_id(real_uuid) assert real_selector.text.splitlines() == ["0", "1"] - assert dash_duo.get_logs() is None, "browser console should contain no error" + assert not dash_duo.get_logs(), "browser console should contain no error" def test_full_configuration(dash_duo, app, testdata_folder) -> None: diff --git a/tests/integration_tests/plugin_tests/test_surface_viewer_fmu.py b/tests/integration_tests/plugin_tests/test_surface_viewer_fmu.py index e7f8d2dbb..1876fe95f 100644 --- a/tests/integration_tests/plugin_tests/test_surface_viewer_fmu.py +++ b/tests/integration_tests/plugin_tests/test_surface_viewer_fmu.py @@ -18,4 +18,4 @@ def test_surface_viewer_fmu(dash_duo, app, shared_settings, testdata_folder) -> ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_surface_with_grid_crossection.py b/tests/integration_tests/plugin_tests/test_surface_with_grid_crossection.py index 791a61d2e..efe038bc3 100644 --- a/tests/integration_tests/plugin_tests/test_surface_with_grid_crossection.py +++ b/tests/integration_tests/plugin_tests/test_surface_with_grid_crossection.py @@ -42,4 +42,4 @@ def test_surface_with_grid_crosssection( ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_surface_with_seismic_crossection.py b/tests/integration_tests/plugin_tests/test_surface_with_seismic_crossection.py index e2383df83..befd67368 100644 --- a/tests/integration_tests/plugin_tests/test_surface_with_seismic_crossection.py +++ b/tests/integration_tests/plugin_tests/test_surface_with_seismic_crossection.py @@ -32,4 +32,4 @@ def test_surface_with_seismic_crosssection( ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_tornado_plotter_fmu.py b/tests/integration_tests/plugin_tests/test_tornado_plotter_fmu.py index ef2a73125..d7c0ff84b 100644 --- a/tests/integration_tests/plugin_tests/test_tornado_plotter_fmu.py +++ b/tests/integration_tests/plugin_tests/test_tornado_plotter_fmu.py @@ -11,4 +11,4 @@ def test_tornado_plotter_fmu(dash_duo, app, shared_settings) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_vfp_analysis.py b/tests/integration_tests/plugin_tests/test_vfp_analysis.py index 4facfa069..b1f2377a8 100644 --- a/tests/integration_tests/plugin_tests/test_vfp_analysis.py +++ b/tests/integration_tests/plugin_tests/test_vfp_analysis.py @@ -10,4 +10,4 @@ def test_vfp_analysis(_webviz_duo: WebvizComposite, shared_settings: dict) -> No _webviz_duo.start_server(plugin) - assert _webviz_duo.get_logs() is None + assert not _webviz_duo.get_logs() diff --git a/tests/integration_tests/plugin_tests/test_well_log_viewer.py b/tests/integration_tests/plugin_tests/test_well_log_viewer.py index 94bed1ad8..74c510770 100644 --- a/tests/integration_tests/plugin_tests/test_well_log_viewer.py +++ b/tests/integration_tests/plugin_tests/test_well_log_viewer.py @@ -13,4 +13,4 @@ def test_well_log_viewer(dash_duo, app, testdata_folder) -> None: ) app.layout = plugin.layout dash_duo.start_server(app) - assert dash_duo.get_logs() is None + assert not dash_duo.get_logs()