示例#1
0
    def test_adding_single_helper_set_overwrites_default_values(self):
        application = Application()
        application.set_auto_exit(False)
        application.set_catch_exceptions(False)

        application.set_helper_set(HelperSet([FormatterHelper()]))

        helper_set = application.get_helper_set()

        self.assertTrue(helper_set.has('formatter'))
        self.assertFalse(helper_set.has('question'))
示例#2
0
    def test_adding_single_helper_set_overwrites_default_values(self):
        application = Application()
        application.set_auto_exit(False)
        application.set_catch_exceptions(False)

        application.set_helper_set(HelperSet({"formatter": FormatterHelper()}))

        helper_set = application.get_helper_set()

        self.assertTrue(helper_set.has("formatter"))
        self.assertFalse(helper_set.has("dialog"))
        self.assertFalse(helper_set.has("progress"))