How to use the pywaffle.waffle.division function in pywaffle

To help you get started, we’ve selected a few pywaffle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gyli / PyWaffle / tests / test_utilities.py View on Github external
def test_division(self):
        self.assertEqual(division(x=2, y=3, method="float"), 2 / 3)
        self.assertIsInstance(division(x=2, y=3, method="float"), float)

        self.assertEqual(division(x=2, y=3, method="nearest"), 1)
        self.assertIsInstance(division(x=2, y=3, method="nearest"), int)

        self.assertEqual(division(x=2, y=3, method="ceil"), 1)
        self.assertIsInstance(division(x=2, y=3, method="ceil"), int)

        self.assertEqual(division(x=2, y=3, method="floor"), 0)
        self.assertIsInstance(division(x=2, y=3, method="floor"), int)
github gyli / PyWaffle / tests / test_utilities.py View on Github external
def test_division(self):
        self.assertEqual(division(x=2, y=3, method="float"), 2 / 3)
        self.assertIsInstance(division(x=2, y=3, method="float"), float)

        self.assertEqual(division(x=2, y=3, method="nearest"), 1)
        self.assertIsInstance(division(x=2, y=3, method="nearest"), int)

        self.assertEqual(division(x=2, y=3, method="ceil"), 1)
        self.assertIsInstance(division(x=2, y=3, method="ceil"), int)

        self.assertEqual(division(x=2, y=3, method="floor"), 0)
        self.assertIsInstance(division(x=2, y=3, method="floor"), int)