diff --git a/sartorius_logger/__init__.py b/sartorius_logger/__init__.py index ed7f8cf..1d40f10 100644 --- a/sartorius_logger/__init__.py +++ b/sartorius_logger/__init__.py @@ -8,6 +8,7 @@ __version__ = "0.0.1" import pandas import sartoriusb import time +import sys from collections import namedtuple from datetime import datetime @@ -108,7 +109,9 @@ def gooey_progress_factory(settings): for i in iterator: print(f"measurement {i} of {total}") yield i + sys.stdout.flush() print(f"measurement {total} of {total}") + sys.stdout.flush() return gui_progress diff --git a/tests/test_sartorius_logger.py b/tests/test_sartorius_logger.py index efe8fb1..bdeef75 100644 --- a/tests/test_sartorius_logger.py +++ b/tests/test_sartorius_logger.py @@ -12,7 +12,7 @@ def settings_fixture(): interval = ParsedDuration(10, "s", 10) directory = Path("/something/made/up") - yield Settings(duration, interval, directory, "usb") + yield Settings(duration, interval, directory, "usb", 31) @pytest.fixture()