/functional_tests/doc_tests/test_selector_plugin/support/tests/math/basic.py

https://bitbucket.org/jpellerin/nose/ · Python · 17 lines · 11 code · 6 blank · 0 comment · 0 complexity · d38d2e59921ed4b488d34f9d934321a0 MD5 · raw file

  1. import testlib
  2. from mypackage import math
  3. class TestBasicMath(testlib.Base):
  4. def test_add(self):
  5. self.assertEqual(math.add(1, 2), 3)
  6. def test_sub(self):
  7. self.assertEqual(math.sub(3, 1), 2)
  8. class TestHelperClass:
  9. def __init__(self):
  10. raise Exception(
  11. "This test helper class should not be collected")