|
|
|
@ -140,10 +140,30 @@ def test_minify_css():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_major(): |
|
|
|
|
assert majorize(()) == [] |
|
|
|
|
assert majorize((0,)) == [] |
|
|
|
|
assert majorize((0, 1)) == [] |
|
|
|
|
assert majorize((0, 1, 2)) == [] |
|
|
|
|
assert majorize((-1, 0, 1, 2)) == [0] |
|
|
|
|
assert majorize((0, .1, .2, .3, .4, .5, .6, .7, .8, .9, 1)) == [0, .5, 1] |
|
|
|
|
assert majorize((0, .2, .4, .6, .8, 1)) == [0, 1] |
|
|
|
|
assert majorize((-.4, -.2, 0, .2, .4, .6, .8, 1)) == [0, 1] |
|
|
|
|
assert majorize( |
|
|
|
|
(-1, -.8, -.6, -.4, -.2, 0, .2, .4, .6, .8, 1)) == [-1, 0, 1] |
|
|
|
|
assert majorize((0, .2, .4, .6, .8, 1, 1.2, 1.4, 1.6)) == [0, 1] |
|
|
|
|
assert majorize((0, .2, .4, .6, .8, 1, 1.2, 1.4, 1.6, 1.8, 2)) == [0, 1, 2] |
|
|
|
|
assert majorize((0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120)) == [0, 50, 100] |
|
|
|
|
assert majorize((0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36)) == [0, 10, 20, 30] |
|
|
|
|
assert majorize( |
|
|
|
|
(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120)) == [0, 50, 100] |
|
|
|
|
assert majorize( |
|
|
|
|
(0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, |
|
|
|
|
22, 24, 26, 28, 30, 32, 34, 36)) == [0, 10, 20, 30] |
|
|
|
|
assert majorize((0, 1, 2, 3, 4, 5)) == [0, 5] |
|
|
|
|
assert majorize((-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5)) == [-5, 0, 5] |
|
|
|
|
assert majorize((-5, 5, -4, 4, 0, 1, -1, 3, -2, 2, -3)) == [-5, 0, 5] |
|
|
|
|
assert majorize((0, 1, 2, 3, 4)) == [0] |
|
|
|
|
assert majorize((3, 4, 5, 6)) == [5] |
|
|
|
|
assert majorize((0, 1, 2, 3, 4, 5, 6, 7, 8)) == [0, 5] |
|
|
|
|
assert majorize((-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5)) == [-5, 0, 5] |
|
|
|
|
assert majorize((-6, -5, -4, -3, -2, -1, 0, 1, 2, 3)) == [-5, 0] |
|
|
|
|
assert majorize((-6, -5, -4, -3)) == [-5] |
|
|
|
|
assert majorize((1, 10, 100, 1000, 10000, 100000)) == [] |
|
|
|
|