Skip to content

Commit f0a07b7

Browse files
committed
Moved tests to examples
See LabPy#13
1 parent 3bfda93 commit f0a07b7

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# test_itc4.py - PyVISA test code for Oxfort ITC4 temperature controller
4+
# itc4.py - PyVISA test code for Oxfort ITC4 temperature controller
55
#
66
# Copyright © 2005, 2006, 2007, 2008
77
# Torsten Bronger <bronger@physik.rwth-aachen.de>,
@@ -33,11 +33,11 @@
3333

3434
from __future__ import division, unicode_literals, print_function, absolute_import
3535

36-
from visa import *
36+
import visa
3737

3838
def test_itc4():
3939
print("Test start")
40-
itc4 = Instrument("COM2", term_chars = b"\r", timeout = 5)
40+
itc4 = visa.Instrument("COM2", term_chars=b"\r", timeout=5)
4141
itc4.write(b"V")
4242
print(itc4.read())
4343
print("Test end")
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# test_keithley2000.py - PyVISA test code for Keithley 2000 multimeter
4+
# keithley2000.py - PyVISA test code for Keithley 2000 multimeter
55
#
66
# Copyright © 2005, 2006, 2007, 2008
77
# Torsten Bronger <bronger@physik.rwth-aachen.de>,
@@ -33,13 +33,13 @@
3333

3434
from __future__ import division, unicode_literals, print_function, absolute_import
3535

36-
from visa import *
36+
import visa
3737

3838
def test_keithley2000(monkeypatch):
39-
monkeypatch.setattr(GpibInstrument, 'interface_type', VI_INTF_GPIB)
40-
monkeypatch.setattr(GpibInstrument, 'stb', 0x40)
39+
monkeypatch.setattr(visa.GpibInstrument, 'interface_type', VI_INTF_GPIB)
40+
monkeypatch.setattr(visa.GpibInstrument, 'stb', 0x40)
4141
print("Test start")
42-
keithley = GpibInstrument(12)
42+
keithley = visa.GpibInstrument(12)
4343
milliseconds = 500
4444
number_of_values = 10
4545
keithley.write(("F0B2M2G0T2Q%dI%dX" % (milliseconds, number_of_values)).encode('ascii'))

0 commit comments

Comments
 (0)