You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
494 B

  1. # Just some helpers for test functions
  2. import shutil, os
  3. def eq_(a, b):
  4. if not a == b:
  5. raise AssertionError("%r != %r" % (a, b))
  6. def in_(a, b):
  7. if a not in b:
  8. raise AssertionError("%r not in %r" % (a, b))
  9. def ne_(a, b):
  10. if not a != b:
  11. raise AssertionError("unexpected %r == %r" % (a, b))
  12. def recursive_unlink(path):
  13. try:
  14. shutil.rmtree(path)
  15. except OSError:
  16. pass
  17. try:
  18. os.unlink(path)
  19. except OSError:
  20. pass