File tree 1 file changed +12
-14
lines changed
1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 7
7
PKG = os .path .dirname (os .path .dirname (__file__ ))
8
8
9
9
10
- try :
11
- import pytest
12
- except ImportError :
13
- def test () :
10
+ def test ( extra_args = None ) :
11
+ try :
12
+ import pytest
13
+ except ImportError :
14
14
raise ImportError ("Need pytest>=3.0 to run tests" )
15
- else :
16
- def test (extra_args = None ):
17
- cmd = ['--skip-slow' , '--skip-network' ]
18
- if extra_args :
19
- if not isinstance (extra_args , list ):
20
- extra_args = [extra_args ]
21
- cmd = extra_args
22
- cmd += [PKG ]
23
- print ("running: pytest {}" .format (' ' .join (cmd )))
24
- sys .exit (pytest .main (cmd ))
15
+ cmd = ['--skip-slow' , '--skip-network' ]
16
+ if extra_args :
17
+ if not isinstance (extra_args , list ):
18
+ extra_args = [extra_args ]
19
+ cmd = extra_args
20
+ cmd += [PKG ]
21
+ print ("running: pytest {}" .format (' ' .join (cmd )))
22
+ sys .exit (pytest .main (cmd ))
25
23
26
24
27
25
__all__ = ['test' ]
You can’t perform that action at this time.
0 commit comments