コード例 #1
0
    def test10(self):
        start, end = 20, 80
        s, e = extend_interval(start,
                               end,
                               '3x',
                               stream='-',
                               op_extend='1x',
                               max_op_extend=100)

        assert s == -40
        assert e == 260
コード例 #2
0
    def test7(self):
        start, end = 20, 80
        s, e = extend_interval(start,
                               end,
                               '2x',
                               max_extend=40,
                               stream='+',
                               op_extend='1x')

        assert s == -20
        assert e == 140
コード例 #3
0
    def test9(self):
        start, end = 20, 80
        s, e = extend_interval(start,
                               end,
                               '3x',
                               stream='+',
                               op_extend='1x',
                               max_op_extend=100)

        assert s == -160
        assert e == 140
コード例 #4
0
    def test1(self):
        start, end = 20, 80
        s, e = extend_interval(start, end)

        assert s == start
        assert e == end
コード例 #5
0
    def test5(self):
        start, end = 20, 80
        s, e = extend_interval(start, end, '2x', max_extend=150)

        assert s == -100
        assert e == 200
コード例 #6
0
    def test4(self):
        start, end = 20, 80
        s, e = extend_interval(start, end, '2x', max_extend=40)

        assert s == -20
        assert e == 120
コード例 #7
0
    def test3(self):
        start, end = 20, 80
        s, e = extend_interval(start, end, '2x')

        assert s == -100
        assert e == 200
コード例 #8
0
    def test2(self):
        start, end = 20, 80
        s, e = extend_interval(start, end, 20)

        assert s == 0
        assert e == 100