Пример #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)

        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.GetTip() == 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.Enabled is False
Пример #4
0
 def test_copy_dict_false(self):
     dlg = DlgFromDict(self.d, copy_dict=False, show=False)
     assert self.d is dlg.dictionary
Пример #5
0
 def test_copy_dict_true(self):
     dlg = DlgFromDict(self.d, copy_dict=True, show=False)
     assert self.d is not dlg.dictionary
Пример #6
0
 def test_sort_keys_false(self):
     dlg = DlgFromDict(self.d, sort_keys=False, show=False)
     keys = list(self.d)
     assert keys == dlg._keys
Пример #7
0
 def test_sort_keys_true(self):
     dlg = DlgFromDict(self.d, sort_keys=True, show=False)
     keys = sorted(self.d)
     assert keys == dlg._keys
Пример #8
0
 def test_title(self):
     dlg = DlgFromDict(self.d, title=self.title, show=False)
     assert dlg.Title == self.title