Ejemplo n.º 1
0
def test_num2upoint():
    assert num2upoint(0x0, [a, b, c, d]) == ({a.uniqid, b.uniqid, c.uniqid, d.uniqid}, set()       )
    #assert num2upoint(0x1, [a, b, c, d]) == ({   2, 3, 4}, {1         })
    #assert num2upoint(0x2, [a, b, c, d]) == ({1,    3, 4}, {   2      })
    #assert num2upoint(0x3, [a, b, c, d]) == ({      3, 4}, {1, 2      })
    #assert num2upoint(0x4, [a, b, c, d]) == ({1, 2,    4}, {      3   })
    assert num2upoint(0x5, [a, b, c, d]) == ({   b.uniqid,    d.uniqid}, {a.uniqid,    c.uniqid   })
    #assert num2upoint(0x6, [a, b, c, d]) == ({1,       4}, {   2, 3   })
    #assert num2upoint(0x7, [a, b, c, d]) == ({         4}, {1, 2, 3   })
    #assert num2upoint(0x8, [a, b, c, d]) == ({1, 2, 3   }, {         4})
    #assert num2upoint(0x9, [a, b, c, d]) == ({   2, 3   }, {1,       4})
    assert num2upoint(0xA, [a, b, c, d]) == ({a.uniqid,    c.uniqid   }, {   b.uniqid,    d.uniqid})
    #assert num2upoint(0xB, [a, b, c, d]) == ({      3   }, {1, 2,    4})
    #assert num2upoint(0xC, [a, b, c, d]) == ({1, 2      }, {      3, 4})
    #assert num2upoint(0xD, [a, b, c, d]) == ({   2      }, {1,    3, 4})
    #assert num2upoint(0xE, [a, b, c, d]) == ({1         }, {   2, 3, 4})
    assert num2upoint(0xF, [a, b, c, d]) == (set()       , {a.uniqid, b.uniqid, c.uniqid, d.uniqid})
Ejemplo n.º 2
0
def test_num2upoint():
    assert num2upoint(0x0, [a, b, c, d]) == ({aa, bb, cc, dd}, set())
    assert num2upoint(0x1, [a, b, c, d]) == ({bb, cc, dd}, {aa})
    assert num2upoint(0x2, [a, b, c, d]) == ({aa, cc, dd}, {bb})
    assert num2upoint(0x3, [a, b, c, d]) == ({cc, dd}, {aa, bb})
    assert num2upoint(0x4, [a, b, c, d]) == ({aa, bb, dd}, {cc})
    assert num2upoint(0x5, [a, b, c, d]) == ({bb, dd}, {aa, cc})
    assert num2upoint(0x6, [a, b, c, d]) == ({aa, dd}, {bb, cc})
    assert num2upoint(0x7, [a, b, c, d]) == ({dd}, {aa, bb, cc})
    assert num2upoint(0x8, [a, b, c, d]) == ({aa, bb, cc}, {dd})
    assert num2upoint(0x9, [a, b, c, d]) == ({bb, cc}, {aa, dd})
    assert num2upoint(0xA, [a, b, c, d]) == ({aa, cc}, {bb, dd})
    assert num2upoint(0xB, [a, b, c, d]) == ({cc}, {aa, bb, dd})
    assert num2upoint(0xC, [a, b, c, d]) == ({aa, bb}, {cc, dd})
    assert num2upoint(0xD, [a, b, c, d]) == ({bb}, {aa, cc, dd})
    assert num2upoint(0xE, [a, b, c, d]) == ({aa}, {bb, cc, dd})
    assert num2upoint(0xF, [a, b, c, d]) == (set(), {aa, bb, cc, dd})
Ejemplo n.º 3
0
def test_num2upoint():
    assert num2upoint(0x0, [a, b, c, d]) == ({aa, bb, cc, dd}, set())
    assert num2upoint(0x1, [a, b, c, d]) == ({bb, cc, dd}, {aa})
    assert num2upoint(0x2, [a, b, c, d]) == ({aa, cc, dd}, {bb})
    assert num2upoint(0x3, [a, b, c, d]) == ({cc, dd}, {aa, bb})
    assert num2upoint(0x4, [a, b, c, d]) == ({aa, bb, dd}, {cc})
    assert num2upoint(0x5, [a, b, c, d]) == ({bb, dd}, {aa, cc})
    assert num2upoint(0x6, [a, b, c, d]) == ({aa, dd}, {bb, cc})
    assert num2upoint(0x7, [a, b, c, d]) == ({dd}, {aa, bb, cc})
    assert num2upoint(0x8, [a, b, c, d]) == ({aa, bb, cc}, {dd})
    assert num2upoint(0x9, [a, b, c, d]) == ({bb, cc}, {aa, dd})
    assert num2upoint(0xA, [a, b, c, d]) == ({aa, cc}, {bb, dd})
    assert num2upoint(0xB, [a, b, c, d]) == ({cc}, {aa, bb, dd})
    assert num2upoint(0xC, [a, b, c, d]) == ({aa, bb}, {cc, dd})
    assert num2upoint(0xD, [a, b, c, d]) == ({bb}, {aa, cc, dd})
    assert num2upoint(0xE, [a, b, c, d]) == ({aa}, {bb, cc, dd})
    assert num2upoint(0xF, [a, b, c, d]) == (set(), {aa, bb, cc, dd})