Esempio n. 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)
Esempio n. 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']
Esempio n. 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
Esempio n. 4
0
 def test_copy_dict_false(self):
     dlg = DlgFromDict(self.d, copyDict=False, show=False)
     assert self.d is dlg.dictionary
Esempio n. 5
0
 def test_copy_dict_true(self):
     dlg = DlgFromDict(self.d, copyDict=True, show=False)
     assert self.d is not dlg.dictionary
Esempio n. 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
Esempio n. 7
0
 def test_title(self):
     dlg = DlgFromDict(self.d, title=self.title, show=False)
     assert dlg.windowTitle() == self.title
Esempio n. 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
 def test_title(self):
     dlg = DlgFromDict(self.d, title=self.title, show=False)
     assert dlg.windowTitle() == self.title