Skip to content

Instantly share code, notes, and snippets.

@aychedee
Last active December 15, 2015 09:19
Show Gist options
  • Save aychedee/5237014 to your computer and use it in GitHub Desktop.
Save aychedee/5237014 to your computer and use it in GitHub Desktop.
import unittest
class A(unittest.TestCase):
def postMessages(self):
print "i post messages in the server!"
class B(A):
@classmethod
def setUpClass(cls):
cls.foo(cls(methodName='test_example')) # should post messages for the tests in the class to work on
def foo(self):
self.postMessages()
def test_example(self):
pass
B.setUpClass()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment