Skip to content

Commit

Permalink
fixing errors in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
peteasa committed Nov 8, 2024
1 parent 3113664 commit e4f5aa8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pyrpl/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,10 @@ def _reload(self):
# prepare next timeout
self._lastreload = time()
logger.debug("Checking change time of config file...")
if self._mtime != os.path.getmtime(self._filename):
logger.debug("Loading because mtime %s != filetime %s",
self._mtime)
filetime = os.path.getmtime(self._filename)
if self._mtime != filetime:
logger.debug('Loading because mtime {} != filetime {}'.format(
self._mtime, filetime))
self._load()
else:
logger.debug("... no reloading required")
Expand Down
2 changes: 1 addition & 1 deletion pyrpl/test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def setUpAll(cls):
sleep(0.1) # give some time for events to get processed

# open all dockwidgets if this is enabled
if cls.OPEN_ALL_DOCKWIDGETS:
if cls.OPEN_ALL_DOCKWIDGETS and 0 < len(cls.pyrpl.widgets):
for name, dock_widget in cls.pyrpl.widgets[0].dock_widgets.items():
print("Showing widget %s..." % name)
dock_widget.setVisible(True)
Expand Down

0 comments on commit e4f5aa8

Please sign in to comment.