diff --git a/sympy/utilities/pytest.py b/sympy/utilities/pytest.py
index 5919697..c321b5f 100644
--- a/sympy/utilities/pytest.py
+++ b/sympy/utilities/pytest.py
@@ -6,7 +6,10 @@
import sys
try:
- import py
+ # tested with py-lib 0.9.0
+ from py.__.test.outcome import Outcome, Passed, Failed, Skipped
+ from py.__.test.terminal.terminal import TerminalSession
+ from py.test import skip
disabled = False
except ImportError:
disabled = True
@@ -43,11 +46,7 @@ if disabled:
def skip(str):
raise Skipped(str)
else:
- # tested with py-lib 0.9.0
- from py.__.test.outcome import Outcome, Passed, Failed, Skipped
- from py.__.test.terminal.terminal import TerminalSession
from time import time as now
- from py.test import skip
__all__ = ['XFAIL']
--
1.5.6.5
Any comments to this?
Ondrej
It's fine, but I would suggest putting a print statement inside the
except bloc, something like "print 'Could not load pylib, using built-in
test lib instead. Having pylib is greatly recommended etc.'"
Also, would be nice to give the disabled variable a more meaningful
name, something like USE_PYLIB