def test_modulo(self): self.assertEqual(5 % 2, calculator.modulo(5, 2))
def test_modulo_zero(): output = calculator.modulo(10, 0) assert output is None
def test_modulo_(): output = calculator.modulo(0, 10) assert output == 0
def test_modulo(self): self.assertEqual(5%2, calculator.modulo(5,2))
def test_modulo(): output = calculator.modulo(10, 5) assert output == 0
def test_modulo(self): self.assertEqual(13 % 3, calculator.modulo(13, 3))
# -*- coding: utf-8 -*- """ ***** Calculator ***** """ import datetime import calculator calculator.add(2, 3) calculator.subtract(10, 3) calculator.multiply(3, 2) calculator.divide(20, 2) calculator.modulo(15, 4) calculator.doCalc(0, 2, 2) calculator.doCalc(1, 2, 2) calculator.doCalc(2, 2, 2) """ ***** Getting current session log: ***** """ calculator.readLogFile() """ ***** Getting logs from date: ***** """ calculator.readLogsFromDate(datetime.date.today()) calculator.readLogsFromDate(datetime.date.today() - datetime.timedelta(days=1))
def test_modulo(self): a = (0, 3) self.assertEqual(calculator.modulo(a), (3))
def test_modulo(self): self.assertEqual(7 % 3, calculator.modulo(7, 3))
def test_modulo(self): self.assertEqual(1, calculator.modulo(5, 2)) self.assertEqual(0, calculator.modulo(3, 3)) self.assertEqual(0, calculator.modulo(0, 3)) self.assertEqual("You can't divide by zero!", calculator.modulo(3, 0))
def test_modulo(self): self.assertEqual(21 % 4, calculator.modulo(21, 4))