_test.py 395 B

12345678910111213141516
  1. import pytest
  2. import funcs
  3. def test_getpath():
  4. assert funcs.get_path('test', 'test1') == 'test/test1'
  5. assert funcs.get_path(['test', 'test1']) == 'test/test1'
  6. assert funcs.get_path(['test']) == 'test'
  7. assert funcs.get_path('test') == 'test'
  8. try:
  9. funcs.get_path()
  10. except AttributeError:
  11. pass
  12. except:
  13. raise Exception('Returned invalid error')