105:89123c2af2fd | 106:bb477c9ea28d |
---|---|
1 import serial | |
2 import pygpibtoolkit.prologix_emulator as PE | |
3 | |
4 import pytest | |
5 | |
6 | |
7 @pytest.fixture(scope='session') | |
8 def newemulator(): | |
9 emul = PE.PrologixEmulator() | |
10 cnx = serial.Serial(emul.serialurl, timeout=0) | |
11 yield (emul, cnx) | |
12 emul.close() | |
13 cnx.close() | |
14 | |
15 | |
16 @pytest.fixture | |
17 def emulator(newemulator): | |
18 emul, cnx = newemulator | |
19 emul.reset() | |
20 return emul, cnx |