Skip to content

Commit 10fae2b

Browse files
committed
Update device_base_class.py test to run.
Creates a top-level `tests` directory which houses the dummy connectiontable object necessary to run the test.
1 parent 7144f6d commit 10fae2b

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

blacs/device_base_class.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ def transition_to_manual(self):
813813
if __name__ == '__main__':
814814
# Test case!
815815

816-
from connections import ConnectionTable
816+
from labscript_utils.connections import ConnectionTable
817817
from labscript_utils.qtwidgets.dragdroptab import DragDropTabWidget
818818

819819
class MyTab(DeviceTab):
@@ -869,7 +869,7 @@ def sort(channel):
869869
button2.clicked.connect(lambda: self.transition_to_manual(Queue()))
870870
self.get_tab_layout().addWidget(button2)
871871

872-
connection_table = ConnectionTable(r'example_connection_table.h5')
872+
connection_table = ConnectionTable('../tests/device_base_classes_connection_table.h5')
873873

874874
class MyWindow(QWidget):
875875

@@ -880,14 +880,11 @@ def __init__(self,*args,**kwargs):
880880
def closeEvent(self,event):
881881
if not self.are_we_closed:
882882
event.ignore()
883-
self.my_tab.shutdown()
883+
self.my_tab.close_tab()
884884
self.are_we_closed = True
885885
QTimer.singleShot(1000,self.close)
886886
else:
887-
if not self.my_tab.shutdown_complete:
888-
QTimer.singleShot(1000,self.close)
889-
else:
890-
event.accept()
887+
event.accept()
891888

892889
def add_my_tab(self,tab):
893890
self.my_tab = tab
34.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)