How to use the approvaltests.Approvals function in approvaltests

To help you get started, we’ve selected a few approvaltests examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MobProgramming / MobTimer.Python / tests / Infrastructure / MobberManager / TestsMobberManager.py View on Github external
mobber_manager.switch_next_driver()
        mobber_manager.set_mobber_list(["Hello", "Eric", "Joe"])
        mobber_manager.switch_next_driver()
        mobber_manager.switch_next_driver()
        mobber_manager.remove_mobber(2)
        mobber_manager.remove_mobber(0)
        mobber_manager.switch_next_driver()
        mobber_manager.add_mobber("Seth")
        mobber_manager.move_mobber_down(0)
        mobber_manager.add_mobber("Fredrick")
        mobber_manager.move_mobber_up(2)
        mobber_manager.remove_mobber(1)
        mobber_manager.remove_mobber(0)
        mobber_manager.remove_mobber(0)

        Approvals.verify(result["result"], self.reporter)
github MobProgramming / MobTimer.Python / tests / Infrastructure / CountdownManager / TestsCountdownManager.py View on Github external
countdown_manager = CountdownManager(None)
        result = {"result": "Times changed to\n", "increment": 0}

        def time_change_callback(days, minutes, seconds):
            result["increment"] += 1
            result["result"] += "Action " + result["increment"].__str__() + ":"
            result["result"] += "    {0:0>2}:{1:0>2}".format(minutes, seconds) + "\n"

        countdown_manager.subscribe_to_time_changes(time_change_callback)
        countdown_manager.set_countdown_duration(4, 42)
        countdown_manager.set_countdown_duration(603, 52)
        countdown_manager.set_countdown_duration(1, 3)
        countdown_manager.set_countdown_duration(853, 32)
        countdown_manager.set_countdown_duration(3, 62)

        Approvals.verify(result["result"], self.reporter)
github MobProgramming / MobTimer.Python / tests / Infrastructure / TimeOptionsManager / TestsTimeOptionsManager.py View on Github external
time_options_manager.increment_seconds()
        time_options_manager.increment_seconds()
        time_options_manager.decrement_seconds()
        time_options_manager.decrement_seconds()
        time_options_manager.decrement_seconds()
        time_options_manager.decrement_seconds()
        time_options_manager.decrement_minutes()
        time_options_manager.decrement_minutes()
        time_options_manager.increment_minutes()
        time_options_manager.increment_minutes()
        time_options_manager.increment_minutes()
        time_options_manager.increment_minutes()
        time_options_manager.increment_minutes()
        time_options_manager.set_countdown_time(3, 14)

        Approvals.verify(result["result"], self.reporter)
github MobProgramming / MobTimer.Python / tests / Infrastructure / MobberManager / TestsMobberManager.py View on Github external
mobber_manager.remove_mobber(2)
        mobber_manager.remove_mobber(0)
        mobber_manager.switch_next_driver()
        mobber_manager.rewind_driver()
        mobber_manager.add_mobber("Seth")
        mobber_manager.rewind_driver()
        mobber_manager.rewind_driver()
        mobber_manager.rewind_driver()
        mobber_manager.move_mobber_down(0)
        mobber_manager.add_mobber("Fredrick")
        mobber_manager.move_mobber_up(2)
        mobber_manager.remove_mobber(1)
        mobber_manager.remove_mobber(0)
        mobber_manager.remove_mobber(0)

        Approvals.verify(result["result"], self.reporter)