Exemplo n.º 1
0
 def __init__(self, port, uuid):
     self.port = port
     self.connections = {}
     self.c2u, self.u2c = create_map()
     self.data = {}
     self.unknowns = set()
     self.a2c, self.c2a = create_map()
     self.uuid = uuid
Exemplo n.º 2
0
 def __init__(self, port, uuid):
     self.port = port
     self.connections = {}
     self.c2u, self.u2c = create_map()
     self.data = {}
     self.unknowns = set()
     self.a2c, self.c2a = create_map()
     self.uuid = uuid
Exemplo n.º 3
0
def test_keypairs():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
Exemplo n.º 4
0
def test_del():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
    del a[1]
    assert 'a' not in b
Exemplo n.º 5
0
def test_overwrite_value():
    a, b = create_map()
    a[1] = 'a'
    a[2] = 'a'
    assert b['a'] == 2
    assert 1 not in a
Exemplo n.º 6
0
def test_overwrite_key():
    a, b = create_map()
    a[1] = 'a'
    a[1] = 'b'
    assert b['b'] == 1
    assert 'a' not in b
Exemplo n.º 7
0
def test_overwrite_key():
    a, b = create_map()
    a[1] = 'a'
    a[1] = 'b'
    assert b['b'] == 1
    assert 'a' not in b
Exemplo n.º 8
0
def test_keypairs():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
Exemplo n.º 9
0
def test_del():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
    del a[1]
    assert 'a' not in b
Exemplo n.º 10
0
def test_overwrite_value():
    a, b = create_map()
    a[1] = 'a'
    a[2] = 'a'
    assert b['a'] == 2
    assert 1 not in a