示例#1
0
 def test_circuit_resistance(self):
     volt = RC_CIRCUIT()
     result = volt.get_circuit_resistance(100, 2)
     self.assertEqual(result, 99.9799979995999)
示例#2
0
 def test_circuit_impedence(self):
     volt = RC_CIRCUIT()
     result = int(volt.get_circuit_impedence(19, 26))
     self.assertEqual(result, 32)
示例#3
0
 def test_circuit_current(self):
     volt = RC_CIRCUIT()
     result = volt.get_circuit_current(40, float(100))
     self.assertEqual(result, 2.5)
示例#4
0
 def test_supply_frequency(self):
     volt = RC_CIRCUIT()
     result = int(volt.get_supply_frequency(float(0.001), 40))
     self.assertEqual(result, 3)
示例#5
0
 def test_capacitive_reactance(self):
     volt = RC_CIRCUIT()
     result = volt.get_capacitive_reactance(100, float(0.001))
     self.assertEqual(result, 1.5915494309189535)
示例#6
0
 def test_pahse_angle(self):
     volt = RC_CIRCUIT()
     result = volt.get_phase_angle(float(10), float(15))
     self.assertEqual(result, 0.982793723247329)
示例#7
0
 def test_capacitive_voltage(self):
     volt = RC_CIRCUIT()
     result = volt.get_capacitive_voltage(3, 30)
     self.assertEqual(result, 90)
示例#8
0
 def test_supply_voltage(self):
     volt = RC_CIRCUIT()
     result = int(volt.get_supply_voltage(200, 50))
     self.assertEqual(result, 206)
示例#9
0
 def test_resistor_voltage(self):
     volt = RC_CIRCUIT()
     result = volt.get_resistor_voltage(float(1.2), 48)
     self.assertEqual(result, 57.599999999999994)