def test_max_time(self):
        g = greedy.GreedyLearner(self.data, max_time=2)
        g.run()
        runtime = g.stats.runtime

        # time based stopping criteria is approximate..
        assert runtime >= 2 and runtime < 3
dataset/ETHPy150Open abhik/pebl/src/pebl/test/learner/test_greedy.py/TestGreedyLearner.test_max_time/original