Browse Source

pytest 2 compat

enkore 8 years ago
parent
commit
0c959cb67a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      conftest.py

+ 2 - 1
conftest.py

@@ -3,7 +3,8 @@ import os
 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')
 
 from borg.logger import setup_logging