예제 #1
0
    def test_order_tuple(self):
        order = ('exp_type', 'participant', 'handedness', 'exp_version')
        # Be certain we will actually request a different order
        # further down.
        assert list(order) != list(self.od.keys())

        dlg = DlgFromDict(self.od, order=order, show=False)
        assert dlg.inputFieldNames == list(order)
예제 #2
0
 def test_tooltips(self):
     tip = dict(participant='Tooltip')
     dlg = DlgFromDict(self.d, tip=tip, show=False)
     field = dlg.inputFields[dlg.inputFieldNames.index('participant')]
     assert field.toolTip() == tip['participant']
예제 #3
0
 def test_fixed(self):
     fixed = 'exp_version'
     dlg = DlgFromDict(self.d, fixed=fixed, show=False)
     field = dlg.inputFields[dlg.inputFieldNames.index(fixed)]
     assert field.isEnabled() is False
예제 #4
0
 def test_copy_dict_false(self):
     dlg = DlgFromDict(self.d, copyDict=False, show=False)
     assert self.d is dlg.dictionary
예제 #5
0
 def test_copy_dict_true(self):
     dlg = DlgFromDict(self.d, copyDict=True, show=False)
     assert self.d is not dlg.dictionary
예제 #6
0
 def test_sort_keys_false(self):
     dlg = DlgFromDict(self.d, sortKeys=False, show=False)
     keys = list(self.d.copy().keys())
     assert keys == dlg._keys
예제 #7
0
 def test_title(self):
     dlg = DlgFromDict(self.d, title=self.title, show=False)
     assert dlg.windowTitle() == self.title
예제 #8
0
 def test_sort_keys_true(self):
     dlg = DlgFromDict(self.d, sort_keys=True, show=False)
     keys = list(self.d.copy().keys())
     keys.sort()
     assert keys == dlg._keys
예제 #9
0
 def test_title(self):
     dlg = DlgFromDict(self.d, title=self.title, show=False)
     assert dlg.windowTitle() == self.title