import unittest import io import re from unittest import mock import math import student_X as main #Replace student_X with your filename class IsDivisibleTests(unittest.TestCase): def test_default_case(self): function = main.is_divisible try: docstring = function.__doc__ docstring = docstring.strip() except: docstring = "" correct = docstring != "" message = "No docstring." self.assertTrue(correct, message) inputs = (200, 25) test = False try: correct = True result = function(*inputs) test = correct == result except: pass message = "Doesn't work when the first parameter is divisible by the second." self.assertTrue(test, message) inputs = (7, 2) test = False try: correct = False result = function(*inputs) test = correct == result except: pass message = "Doesn't work when the first number isn't divisible by the second." self.assertTrue(test, message) if __name__ == "__main__": tests = IsDivisibleTests() tests.test_default_case()