Ejemplo n.º 1
0
def test_any_divmod():
    target = divmod(junc.any(5,6,7), 3)
    assert target != (1,1)
    assert target == (1,2)
    assert target == (2,0)
    assert target == (2,1)
    assert target != (2,2)
Ejemplo n.º 2
0
def test_any_round():
    target = round(junc.any(1.6,3.3,5.7))
    assert target != 1
    assert target == 2
    assert target == 3
    assert target != 4
    assert target != 5
    assert target == 6
Ejemplo n.º 3
0
def test_any_ceil():
    import math
    target = math.ceil(junc.any(1.6,3.3,5.7))
    assert target != 1
    assert target == 2
    assert target != 3
    assert target == 4
    assert target != 5
    assert target == 6
Ejemplo n.º 4
0
def test_any_trunc():
    import math
    target = math.trunc(junc.any(1.6,3.3,5.7))
    assert target == 1
    assert target != 2
    assert target == 3
    assert target != 4
    assert target == 5
    assert target != 6
Ejemplo n.º 5
0
def test_any_mul():
    target = junc.any(1,2,3) * 10
    assert target == 20
    assert target == 30
    assert target == 10
Ejemplo n.º 6
0
def test_any_ne_one():
    assert junc.any(1, 2) != junc.one(3, 4)
Ejemplo n.º 7
0
def test_any_repr():
    assert repr(junc.any('hello', 'world')) == "any('hello', 'world')"
Ejemplo n.º 8
0
def test_any_pow():
    target = junc.any(1,2,3) ** 2
    assert target == 1
    assert target == 4
    assert target == 9
    assert target != 10
Ejemplo n.º 9
0
def test_any_lshift():
    target = junc.any(0x1,0x2,0x3) << 1
    assert target == 0x2
    assert target == 0x4
    assert target == 0x6
    assert target != 0x7
Ejemplo n.º 10
0
def test_any_neg():
    assert -junc.any(1,2,3) == -2
Ejemplo n.º 11
0
def test_any_mod():
    target = junc.any(5,6,7) % 3
    assert target == junc.all(0,1,2)
    assert target == junc.none(-1,3)
Ejemplo n.º 12
0
def test_none_eq_any():
    assert junc.none(1, 2) == junc.any(3, 4)
Ejemplo n.º 13
0
def test_any_or():
    assert junc.any(1,2,3) | 4 == junc.all(1, 4)
Ejemplo n.º 14
0
def test_any_str():
    assert str(junc.any('hello', 'world')) == "any('hello', 'world')"
Ejemplo n.º 15
0
def test_any_ne_none():
    assert junc.any(1, 2) != junc.none(1, 3)
Ejemplo n.º 16
0
def test_any_eq_none():
    assert junc.any(1, 2) == junc.none(3, 4)
Ejemplo n.º 17
0
def test_any_truediv():
    target = junc.any(1,2,3) / 2
    assert target == 0.5
    assert target == 1
    assert target == 1.5
Ejemplo n.º 18
0
def test_any_pos():
    assert +junc.any(1,2,3) == +2
Ejemplo n.º 19
0
def test_any_floordiv():
    target = junc.any(5,6,7) // 2
    assert 1 != target
    assert 2 == target
    assert 3 == target
    assert 4 != target
Ejemplo n.º 20
0
def test_any_abs():
    assert abs(junc.any(1,-2,3)) == +2
Ejemplo n.º 21
0
def test_any_eq_all():
    assert junc.any(1, 2) == junc.all(1, 2)
Ejemplo n.º 22
0
def test_any_inverse():
    target = ~junc.any(1)
    assert target == -2
    assert target != 1
Ejemplo n.º 23
0
def test_single_any_eq():
    assert junc.any(1,2,3,3,3) == 3
Ejemplo n.º 24
0
def test_one_eq_any():
    assert junc.one(1, 2) == junc.any(1, 3)
Ejemplo n.º 25
0
def test_any_rshift():
    target = junc.any(0x2,0x4,0x6) >> 1
    assert target == 0x1
    assert target == 0x2
    assert target == 0x3
    assert target != 0x4
Ejemplo n.º 26
0
def test_any_ne_all():
    assert junc.any(1, 2) != junc.all(1, 3)
Ejemplo n.º 27
0
def test_any_and():
    assert junc.any(1,2,3) & 4 == junc.any(1, 4)
Ejemplo n.º 28
0
def test_single_nlt():
    assert not (7 < junc.any(1,2,3))
Ejemplo n.º 29
0
def test_one_ne_any():
    assert junc.one(1, 2) != junc.any(1, 2)
Ejemplo n.º 30
0
def test_any_ne_any():
    assert junc.any(1, 2) != junc.any(3, 4)