Beispiel #1
0
    def test_set_frequency(self):
        freq = 500
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result = lcr.set_frequency(freq)

        self.assertEqual(result[1], StatusCode.success)
Beispiel #2
0
    def test_set_impedance_type_ZTR(self):
        imp_type = 'ZTR'
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result = lcr.set_impedance_type(imp_type)

        self.assertEqual(result[1], StatusCode.success)
Beispiel #3
0
    def test_set_impedance_range(self):
        imp_range = 10
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result = lcr.set_impedance_range(imp_range)

        self.assertEqual(result[1], StatusCode.success)
Beispiel #4
0
    def test_set_frequency_unit_MHz(self):
        freq = 1
        unit = 'MHz'
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result = lcr.set_frequency(freq, unit)

        self.assertEqual(result[1], StatusCode.success)
Beispiel #5
0
    def test_get_impedance(self):
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result = lcr.get_impedance()

        self.assertEqual(type(result), list)
        self.assertEqual(len(result), 3)
        self.assertEqual(type(result[0]), float)
        self.assertEqual(type(result[1]), float)
Beispiel #6
0
    def test_get_frequency(self):
        freq = 500
        unit = 'Hz'
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result_set = lcr.set_frequency(freq, unit)
        result_get = lcr.get_frequency()

        self.assertEqual(result_set[1], StatusCode.success)
        self.assertEqual(result_get, freq)
Beispiel #7
0
    def test_set_lowest_freq_and_get_impedance(self):
        freq = 20
        unit = 'Hz'
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result_set = lcr.set_frequency(freq, unit)
        result = lcr.get_impedance()

        self.assertEqual(result_set[1], StatusCode.success)
        self.assertEqual(type(result), list)
        self.assertEqual(len(result), 3)
        self.assertEqual(type(result[0]), float)
        self.assertEqual(type(result[1]), float)
Beispiel #8
0
    def test_trigger_immediate(self):
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result = lcr.trigger_immediate()

        self.assertEqual(result[1], StatusCode.success)
Beispiel #9
0
    def test_get_id(self):
        visa_addr = get_visaaddr()
        lcr = Agilent4284A(visa_addr)
        result = lcr.get_id()

        self.assertEqual(result, get_id())
Beispiel #10
0
 def test_init(self):
     visa_addr = get_visaaddr()
     Agilent4284A(visa_addr)