Created
January 13, 2013 05:14
-
-
Save echohack/4522427 to your computer and use it in GitHub Desktop.
A short bit of code to test a SublimeText Python developer environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyPrint: | |
def __init__(self): | |
pass | |
def myPrint(self): | |
for item in range(10): | |
print("This is the item at " + str(item) + " .") | |
return True | |
class MyPrint_Test(): | |
p = None | |
@classmethod | |
def setup_class(cls): | |
cls.p = MyPrint() | |
@classmethod | |
def teardown_class(cls): | |
cls.p = None | |
def myPrint_test(self): | |
assert p.myPrint() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run the unit test, I get NameError: global name 'p' is not defined, why??