asserts.py 316 B

12345678910111213
  1. from os import environ
  2. def assert_in(file, files_to_check):
  3. if file not in files_to_check:
  4. raise AssertionError("{} does not exist in the list".format(str(file)))
  5. return True
  6. def assert_in_env(check_list: list):
  7. for item in check_list:
  8. assert_in(item, environ.keys())
  9. return True