def test_walk(self):
        sc = ServiceCalendar()
        sc.add_period( 0, 1*3600*24, ['WKDY'] )
        tz = Timezone()
        tz.add_period( TimezonePeriod(0, 1*3600*24, 0) )
        
        hb = HeadwayBoard("WKDY", sc, tz, 0, "tr1", 200, 1000, 50)
        
        s0 = State(1,0)
        s1 = hb.walk(s0,WalkOptions())
        assert s1.time == 250
        assert s1.weight == 251
        
        s0 = State(1,200)
        s1 = hb.walk(s0,WalkOptions())
        assert s1.time == 250
        assert s1.weight == 51
        
        s0 = State(1, 500)
        s1 = hb.walk(s0,WalkOptions())
        assert s1.time == 550
        assert s1.weight == 51
        
        s0 = State(1, 1000)
        s1 = hb.walk(s0,WalkOptions())
        assert s1.time == 1050
        assert s1.weight == 51
        
        s0 = State(1, 1001)
        s1 = hb.walk(s0,WalkOptions())
        assert s1 == None
dataset/ETHPy150Open bmander/graphserver/pygs/test/unit_test/test_headwayboard.py/TestHeadwayBoard.test_walk/original