Example #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
Example #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
Example #3
0
def test_keypairs():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
Example #4
0
def test_del():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
    del a[1]
    assert 'a' not in b
Example #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
Example #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
Example #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
Example #8
0
def test_keypairs():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
Example #9
0
def test_del():
    a, b = create_map()
    a[1] = 'a'
    assert b['a'] == 1
    del a[1]
    assert 'a' not in b
Example #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