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.
 
 
 

31 lines
717 B

  1. """
  2. Checks that no implementation makes use of symbolic links.
  3. """
  4. import os
  5. import pqclean
  6. import helpers
  7. def test_no_symlinks():
  8. for scheme in pqclean.Scheme.all_schemes():
  9. for implementation in scheme.implementations:
  10. yield check_no_symlinks, implementation
  11. @helpers.filtered_test
  12. def check_no_symlinks(implementation):
  13. for file in os.listdir(implementation.path()):
  14. fpath = os.path.join(implementation.path(), file)
  15. if os.path.islink(fpath):
  16. raise AssertionError("{} is a symbolic link!".format(fpath))
  17. if __name__ == '__main__':
  18. try:
  19. import nose2
  20. nose2.main()
  21. except ImportError:
  22. import nose
  23. nose.runmodule()