pointer_vector.py 628 B

12345678910111213141516171819202122232425262728293031
  1. # Copyright Joel de Guzman 2004. Distributed under the Boost
  2. # Software License, Version 1.0. (See accompanying
  3. # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. '''
  5. >>> import pointer_vector_ext
  6. >>> d = pointer_vector_ext.DoesSomething()
  7. >>> lst = d.returnList()
  8. >>> lst[0].f();
  9. 'harru'
  10. '''
  11. def run(args = None):
  12. import sys
  13. import doctest
  14. if args is not None:
  15. sys.argv = args
  16. return doctest.testmod(sys.modules.get(__name__))
  17. if __name__ == '__main__':
  18. print('running...')
  19. import sys
  20. status = run()[0]
  21. if (status == 0): print("Done.")
  22. sys.exit(status)