1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 08:16:54 +00:00

conftest: pytest 2 compat

This commit is contained in:
enkore 2016-12-17 15:23:47 +01:00 committed by GitHub
parent 49c05719d8
commit af923e261b

View file

@ -5,7 +5,8 @@
import pytest
# needed to get pretty assertion failures in unit tests:
pytest.register_assert_rewrite('borg.testsuite')
if hasattr(pytest, 'register_assert_rewrite'):
pytest.register_assert_rewrite('borg.testsuite')
# This is a hack to fix path problems because "borg" (the package) is in the source root.
# When importing the conftest an "import borg" can incorrectly import the borg from the