python NameError: global name '__file__' is not defined?

When I run this code in python 2.7, I get this error: Traceback (most recent call last): File "C:\Python26\Lib\site...

python NameError: global name '__file__' is not defined?

When I run this code in python 2.7, I get this error: Traceback (most recent call last): File "C:\Python26\Lib\site...

Python NameError: global name 'assertEqual' is not defined?

I'm following Learn Python the Hard Way and I'm on Exercise 47 - Automated Testing (http://learnpythonthehardway.org...