Example #1
0
from divide import Solution

sln = Solution()

print("TestCase1: ", (sln.divide(7, -3) == -2))
print("TestCase2: ", (sln.divide(7, -3) == -2))
Example #2
0
import pytest

from divide import Solution, Solution2

solution_list = [Solution(), Solution2()]

# testcases: List[Tuple[inp, out]]
# use `set` to indicate the expected output may be multiple
data = [
    (
        (15, 2),
        7,
    ),
    (
        (7, -3),
        -2,
    ),
    (
        (0, 1),
        0,
    ),
    (
        (1, 1),
        1,
    ),
    (
        (-1, -1),
        1,
    ),
    (
        (-2147483648, -1),
Example #3
0
 def setUp(self):
     self.solution = Solution()