Python Learning - Issue with unit test module

I have a practice scenerio to define a test test_isEven1, inside TestIsEvenMethod, that checks if isEven(5) returns False or not. i tried to run below piece of code but its not going through:

import unittest

class TestIsEvenMethod(unittest.TestCase):
def isEven(n):
if n%2==0:
print(“True”)
else:
print(“False”)

def test_isEven1(self):
    result = isEven(5)
    self.assertEqual(result,false)

if name == ‘main’:
unittest.main()

Error i am getting is -
E

ERROR: C:\Users\John\AppData\Roaming\jupyter\runtime\kernel-b2f7f45b-818e-401f-a3b3-503a1eabbdc4 (unittest.loader._FailedTest)

AttributeError: module ‘main’ has no attribute ‘C:\Users\John\AppData\Roaming\jupyter\runtime\kernel-b2f7f45b-818e-401f-a3b3-503a1eabbdc4’


Ran 1 test in 0.005s

FAILED (errors=1)


Any Helps?

Are you trying to run this as a block of code you typed into the Jupyter
interactive interpreter, or as a script you saved as a .py file?

Jupyter plays around with the runtime environment which sometimes means
things don’t work the same in Jupyter as the plain interpeter. Try
saving your code as a .py file and running it, see whether that makes a
difference.

Also, your “isEven” method should either be moved outside of the class
(making it a regular function) or it should be given a “self” parameter.
The first option is probably better:

def isEven(n):
    ...

class TestIsEven(unittest.TestCase):
    ...