Exemplo n.º 1
0
    def test_get_default_progressbar(self):
        rc["progress"]["progress_bar"] = "False"
        assert isinstance(get_default_progressbar(), NoProgressBar)

        rc["progress"]["progress_bar"] = "True"
        assert isinstance(get_default_progressbar(), AutoProgressBar)

        rc["progress"]["progress_bar"] = "nengo.utils.progress.HtmlProgressBar"
        assert isinstance(get_default_progressbar(), HtmlProgressBar)

        rc["progress"]["progress_bar"] = "nengo.utils.progress.TerminalProgressBar"
        assert isinstance(get_default_progressbar(), TerminalProgressBar)
Exemplo n.º 2
0
    def test_get_default_progressbar(self):
        rc["progress"]["progress_bar"] = "False"
        assert isinstance(get_default_progressbar(), NoProgressBar)

        rc["progress"]["progress_bar"] = "True"
        assert isinstance(get_default_progressbar(), AutoProgressBar)

        rc["progress"]["progress_bar"] = "nengo.utils.progress.HtmlProgressBar"
        assert isinstance(get_default_progressbar(), HtmlProgressBar)

        rc["progress"][
            "progress_bar"] = "nengo.utils.progress.TerminalProgressBar"
        assert isinstance(get_default_progressbar(), TerminalProgressBar)

        rc["progress"]["progress_bar"] = "nengo.InvalidType"
        with pytest.warns(UserWarning, match="Could not load progress bar"):
            assert isinstance(get_default_progressbar(), NoProgressBar)