import codewars_test as test import random # Random test cases @test.describe("Random tests") def random_tests(): @test.it("Random tests") def random_test_cases(): for _ in range(100): a = random.randint(-1000, 1000) b = random.randint(-1000, 1000) expected = a - b test.assert_equals(sub(a,b), expected)
- import codewars_test as test
- import random
- # Random test cases
- @test.describe("Random tests")
- def random_tests():
- @test.it("Random tests")
- def random_test_cases():
- for _ in range(100):
- a = random.randint(-1000, 1000)
- b = random.randint(-1000, 1000)
- expected = a - b
test.assert_equals(s(a,b), expected)- test.assert_equals(sub(a,b), expected)