Skip to content

Instantly share code, notes, and snippets.

@torufurukawa
Created October 2, 2011 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torufurukawa/1257008 to your computer and use it in GitHub Desktop.
Save torufurukawa/1257008 to your computer and use it in GitHub Desktop.
nonvirtualunittest.py を使う例
import unittest
from nonvirtualunittest import TestCase
class BaseTestCase(TestCase):
def setUp(self):
self.foo = [1]
class MyTestCase(BaseTestCase):
def setUp(self):
self.foo.append(2)
def test(self):
self.foo.append(9)
self.assertEqual(len(self.foo), 3) # pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment