def test_password_editor_caching(self): editor_1 = password_editor() editor_2 = password_editor() self.assertIs(editor_1, editor_2) editor_3 = password_editor(auto_set=False, enter_set=True) editor_4 = password_editor(auto_set=False, enter_set=True) self.assertIs(editor_3, editor_4)
def test_password_editor_options(self): editor = password_editor(auto_set=False, enter_set=True) self.assertIsInstance(editor, traitsui.api.TextEditor) self.assertTrue(editor.password) self.assertFalse(editor.auto_set) self.assertTrue(editor.enter_set)
def test_password_editor_default(self): editor = password_editor() self.assertIsInstance(editor, traitsui.api.TextEditor) self.assertTrue(editor.password) self.assertTrue(editor.auto_set) self.assertFalse(editor.enter_set)