コード例 #1
0
def test_get_serial_gwgds1072au_00():
    """[summary]
    """
    actual=get_serial_gwgds1072au(a_port_sequence=THE_PORT_SEQUENCE)
    assert not actual is None
コード例 #2
0
"""[summary]
"""
from serial_com.get_port_sequence import get_port_sequence
from serial_com.get_serial_gwgds1072au import get_serial_gwgds1072au
from serial_com.is_device_gwgds1072au import is_device_gwgds1072au
from serial_com.set_autoset_gwgds1072au import set_autoset_gwgds1072au
THE_SERIAL = get_serial_gwgds1072au(a_port_sequence=get_port_sequence())


def test_set_autoset_gwgds1072_00():
    """[case default]
    """
    actual = set_autoset_gwgds1072au(a_serial=THE_SERIAL)

    assert actual is None


# def test_set_autoset_gwgds1072_01():
#     """[summary]
#     """
#     the_autoset=500
#     actual=set_autoset_gwgds1072(a_serial=THE_SERIAL,a_autoset=the_autoset)

#     assert actual is None
コード例 #3
0
ファイル: test_multi.py プロジェクト: MatsWallden/OMCCD
#%%
import time
from serial_com.get_port_sequence import get_port_sequence
from serial_com.get_serial_gwgds1072au import get_serial_gwgds1072au
from serial_com.get_signal_scale_gwgds1072 import get_signal_scale_gwgds1072
from serial_com.get_signal_packed_gwgds1072au import get_signal_packed_gwgds1072au
from serial_com.get_signal_gwgds1072au import get_signal_gwgds1072au
from serial_com.get_time_scale_acquisition_gwgds1072au import get_time_scale_acquisition_gwgds1072au
#%%
the_file_name = "./store_buffer.txt"

the_file = open(the_file_name, 'a')

the_port_sequence = get_port_sequence()

the_serial_osc = get_serial_gwgds1072au(a_port_sequence=the_port_sequence)
# %%
#the_scale=get_signal_scale_gwgds1072(a_serial=the_serial_osc,a_channel_id="1")
# %%
# %%

#the_signal=get_signal_gwgds1072au(a_signal_packed=the_signal_packed,a_scale=1.0)
# %%
#the_time_scale=get_time_scale_acquisition_gwgds1072au(a_signal_packed=the_signal_packed)

#the_signal_packed=get_signal_packed_gwgds1072au(a_serial=the_serial_osc,a_channel_id="1")

#the_file.write(str(the_signal_packed))

#%%
コード例 #4
0
ファイル: post_test.py プロジェクト: MatsWallden/OMCCD
"""[summary]
"""
from serial_com.get_serial_gwgds1072au import get_serial_gwgds1072au
from serial_com.get_port_sequence import get_port_sequence
from serial_com.post import post

THE_PORT_SEQUENCE = get_port_sequence()
THE_SERIAL = get_serial_gwgds1072au(a_port_sequence=THE_PORT_SEQUENCE)

if THE_SERIAL is None:
    raise Exception("no serial object found")

THE_COMMAND = b'*idn?\n'


def test_post_00():
    """[test for function post]
    """
    actual = post(a_serial=THE_SERIAL, a_command=THE_COMMAND)

    assert not actual is None
    assert isinstance(actual, int)
    assert actual == 6