utls.py 266 B

1234567891011121314
  1. import os
  2. FIXTURE_DIR = os.path.join(
  3. os.path.dirname(os.path.realpath(__file__)),
  4. 'test_files',
  5. )
  6. def test_path(file):
  7. return os.path.join(FIXTURE_DIR, file)
  8. def load_testdata(file):
  9. with open(test_path(file), 'r') as f:
  10. return f.read()