Fixing ci - #41
Conversation
probably got repeated during a merge conflict
ensures threads are ended
JamesOHeaDLS
left a comment
There was a problem hiding this comment.
Thanks @M-Chan
Comments in the review. There are also a few tests in test_motor.py and test_comms_thread.py which are still commented out. I think most of them would now run after restoring and updating
| # assert self.obj.updateReadyEvent is None | ||
| # assert self.obj.disablePollingStatus is False |
There was a problem hiding this comment.
updateReadyEvent can be deleted rather than commented out
disablePollingStatus now has a new equivalent that can be tested against - disablePollingStatusValue
| assert self.obj.ConnectionType == 1 | ||
| assert ( | ||
| self.obj.lneServer.text() == "172.23.171.103" | ||
| ) ### CHANGE BACK TO "172.23.240.97" |
There was a problem hiding this comment.
This should stay as the original address for the test as the other address is only for your lab tests
| def update_func(self): | ||
| if self.parent.pmac is None or not self.parent.pmac.isConnectionOpen: | ||
| time.sleep(0.1) | ||
| # time.sleep(0.1) |
There was a problem hiding this comment.
Removing the sleeps makes sense, but delete the lines rather than comment them out.
This change does highlight that some functionality has been lost with the recent changes - the ability to enable/disable polling. There is a disblePollingStatusValue variable now, but it is not checked for anywhere. This should be checked for and the timer stopped
| self.timer.stop() | ||
| self.finished.emit() | ||
| self.timer.deleteLater() | ||
| self.timer = None |
There was a problem hiding this comment.
Careful with deleting and setting the timer to None if we want to be able to start and stop it when polling enabled/disabled
|
|
||
| QMainWindow.__init__(self, parent) | ||
| self.setup_ui(self) | ||
| # self.parent = parent |
There was a problem hiding this comment.
This commented out line can also be removed
|
|
||
| def tearDown(self): | ||
| self.obj.close() | ||
| self.obj.close() |
No description provided.