spacepaste

  1.  
  2. (vmprof)[brick:~/src/intro/part2] $ cat tests/test_interp.py
  3. from asminterp import interp1
  4. from asminterp.parser import parse
  5. class BaseTestInterp(object):
  6. def test_return_1(self):
  7. r = self.interp("""
  8. load_integer 13
  9. print
  10. """)
  11. assert r == [13]
  12. def TestInterp(BaseTestInterp):
  13. def interp(self, p):
  14. return interp1.interp(parse(p))
  15. (vmprof)[brick:~/src/intro/part2] $ py.test -sxv --pdb tests/test_interp.py
  16. ============================================== test session starts ==============================================
  17. platform darwin -- Python 2.7.10, pytest-2.9.2, py-1.4.27.dev1, pluggy-0.3.1 -- /Users/dev/.virtualenvs/vmprof/bin/python
  18. cachedir: tests/.cache
  19. rootdir: /Users/dev/src/intro/part2/tests, inifile:
  20. plugins: xdist-1.14, django-2.9.1, cov-2.5.1, hypothesis-3.0.2
  21. collected 0 items
  22. ========================================= no tests ran in 0.01 seconds ==========================================
  23. (vmprof)[brick:~/src/intro/part2] $
  24.