Skip to content

Commit c2e7c7b

Browse files
removed some tests for now
1 parent 75246e4 commit c2e7c7b

15 files changed

Lines changed: 143 additions & 1048 deletions

Utilities/PlotterUtil_GUI_v3.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -840,14 +840,6 @@ def append_file_data(self):
840840
finally:
841841
# Always restart the watcher after an append operation.
842842
self.start_file_watcher()
843-
844-
def _read_new_lines(self, filepath, file_info):
845-
"""Reads new lines from the end of a file."""
846-
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
847-
f.seek(file_info['size'])
848-
new_lines = f.readlines()
849-
return new_lines
850-
851843
def _parse_and_append_new_data(self, new_lines, file_info):
852844
"""Parses new lines and appends them to the data cache."""
853845
if not new_lines:
@@ -936,7 +928,9 @@ def _plot_file_data(self, filepath, x_col, y_col):
936928
plot_y = raw_y[finite_mask]
937929

938930
if plot_x.size > 0:
939-
label_text = f"{y_col} vs {x_col} ({filename})" if len(self.file_ui_elements) > 1 else f"{y_col} vs {x_col}"
931+
label_text = (f"{y_col} vs {x_col} ({filename})"
932+
if len(self.file_ui_elements) > 1
933+
else f"{y_col} vs {x_col}")
940934
self.ax_main.plot(
941935
plot_x,
942936
plot_y,
@@ -1042,11 +1036,6 @@ def check_for_updates(self):
10421036
self.log(
10431037
"File watcher stopped: file is inaccessible or has been deleted.")
10441038
self.stop_file_watcher()
1045-
1046-
1047-
1048-
1049-
10501039
if __name__ == '__main__':
10511040
# This is ESSENTIAL for multiprocessing to work in a bundled executable
10521041
# and to prevent pickling errors with 'spawn' start method on Windows.

Utilities/my_plot_utils.py

Lines changed: 0 additions & 78 deletions
This file was deleted.

Utilities/plot_utils.py

Lines changed: 0 additions & 81 deletions
This file was deleted.

tests/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
import matplotlib
3+
4+
# Force matplotlib to not use any X11/Windows GUI backend
5+
# This prevents "KeyError" and display issues during testing
6+
matplotlib.use('Agg')
7+
8+
9+
@pytest.fixture(autouse=True)
10+
def reset_matplotlib_params():
11+
"""Ensures matplotlib config is clean for every test."""
12+
matplotlib.rcdefaults()

tests/test_auto_discovery.py

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)