Skip to content

Commit

Permalink
Moved tests to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Feb 2, 2014
1 parent 3bfda93 commit f0a07b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pyvisa/testsuite/test_itc4.py → examples/itc4.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# test_itc4.py - PyVISA test code for Oxfort ITC4 temperature controller
# itc4.py - PyVISA test code for Oxfort ITC4 temperature controller
#
# Copyright © 2005, 2006, 2007, 2008
# Torsten Bronger <[email protected]>,
Expand Down Expand Up @@ -33,11 +33,11 @@

from __future__ import division, unicode_literals, print_function, absolute_import

from visa import *
import visa

def test_itc4():
print("Test start")
itc4 = Instrument("COM2", term_chars = b"\r", timeout = 5)
itc4 = visa.Instrument("COM2", term_chars=b"\r", timeout=5)
itc4.write(b"V")
print(itc4.read())
print("Test end")
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# test_keithley2000.py - PyVISA test code for Keithley 2000 multimeter
# keithley2000.py - PyVISA test code for Keithley 2000 multimeter
#
# Copyright © 2005, 2006, 2007, 2008
# Torsten Bronger <[email protected]>,
Expand Down Expand Up @@ -33,13 +33,13 @@

from __future__ import division, unicode_literals, print_function, absolute_import

from visa import *
import visa

def test_keithley2000(monkeypatch):
monkeypatch.setattr(GpibInstrument, 'interface_type', VI_INTF_GPIB)
monkeypatch.setattr(GpibInstrument, 'stb', 0x40)
monkeypatch.setattr(visa.GpibInstrument, 'interface_type', VI_INTF_GPIB)
monkeypatch.setattr(visa.GpibInstrument, 'stb', 0x40)
print("Test start")
keithley = GpibInstrument(12)
keithley = visa.GpibInstrument(12)
milliseconds = 500
number_of_values = 10
keithley.write(("F0B2M2G0T2Q%dI%dX" % (milliseconds, number_of_values)).encode('ascii'))
Expand Down

0 comments on commit f0a07b7

Please sign in to comment.