Пример #1
0
def test_complete_probe_1():
    probe = generate_probe({3: 8}, 'complete')
    assert len(probe) == 1
    assert probe[3]['channels'] == range(8)
    for i in range(8):
        for j in range(i + 1, 8):
            assert [i, j] in probe[3]['graph']
Пример #2
0
def test_complete_probe_1():
    probe = generate_probe({3: 8}, 'complete')
    assert len(probe) == 1
    assert probe[3]['channels'] == range(8)
    for i in range(8):
        for j in range(i+1, 8):
            assert [i, j] in probe[3]['graph']
Пример #3
0
def test_linear_probe_2():
    probe = generate_probe({0: 8, 1: 6, 3: 4})
    assert len(probe) == 3
    
    assert probe[0]['channels'] == range(8)
    
    assert probe[1]['channels'] == range(8, 14)
    
    assert probe[3]['channels'] == range(14, 18)
Пример #4
0
def test_linear_probe_2():
    probe = generate_probe({0: 8, 1: 6, 3: 4})
    assert len(probe) == 3

    assert probe[0]['channels'] == range(8)

    assert probe[1]['channels'] == range(8, 14)

    assert probe[3]['channels'] == range(14, 18)
Пример #5
0
def test_load_probe_1():
    dir = tempfile.gettempdir()
    filename = os.path.join(dir, 'probe.py')
    
    probe = generate_probe(8)
    save_probe(filename, probe)
    
    probe_bis = load_probe(filename)
    
    assert probe == probe_bis
Пример #6
0
def test_load_probe_1():
    dir = tempfile.gettempdir()
    filename = os.path.join(dir, 'probe.py')

    probe = generate_probe(8)
    save_probe(filename, probe)

    probe_bis = load_probe(filename)

    assert probe == probe_bis
Пример #7
0
def test_linear_probe_3():
    probe = generate_probe({3: 8})
    assert len(probe) == 1
    assert probe[3]['channels'] == range(8)
Пример #8
0
def test_linear_probe_1():
    probe = generate_probe({0: 8})
    assert len(probe) == 1
    assert probe[0]['channels'] == range(8)
    assert probe[0]['graph']
    assert probe[0]['geometry']
Пример #9
0
def test_linear_probe_0():
    probe = generate_probe({})
    assert probe == {}
Пример #10
0
def test_linear_probe_3():
    probe = generate_probe({3: 8})
    assert len(probe) == 1
    assert probe[3]['channels'] == range(8)
Пример #11
0
def test_linear_probe_1():
    probe = generate_probe({0: 8})
    assert len(probe) == 1
    assert probe[0]['channels'] == range(8)
    assert probe[0]['graph']
    assert probe[0]['geometry']
Пример #12
0
def test_linear_probe_0():
    probe = generate_probe({})
    assert probe == {}