Explorar el Código

pytest 2 compat

enkore hace 9 años
padre
commit
0c959cb67a
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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