def test_fail(self): number = [ [1, 3, [4, 6, 7]], [1, [3]], ] expect = False result = rational.INT_Q_B(number) self.assertEqual(result, expect)
def test_zero(self): zero = [ [0, 1, [0]], [1, [1]], ] expect = True result = rational.INT_Q_B(zero) self.assertEqual(result, expect)
def test_negative(self): number = [ [1, 3, [4, 6, 7]], [1, [1]], ] expect = True result = rational.INT_Q_B(number) self.assertEqual(result, expect)
def on_btn_q_int_released(self): try: q1 = self.get_q_q(1) result = rational.INT_Q_B(q1) self.add_history_record('%s - %sцелое' % ( pretty.rational(q1), '' if result else 'не ', )) except Exception as e: self.on_exception(e)