@@ -25,8 +25,8 @@ using these steps:
25
25
26
26
import tox
27
27
28
- os.chdir(os.getenv(' WORKSPACE' ))
29
- tox.cmdline() # environment is selected by ``TOXENV`` env variable
28
+ os.chdir(os.getenv(" WORKSPACE" ))
29
+ tox.cmdline() # environment is selected by ``TOXENV`` env variable
30
30
31
31
* check ``Publish JUnit test result report `` and enter
32
32
``**/junit-*.xml `` as the pattern so that Jenkins collects
@@ -58,11 +58,12 @@ with this:
58
58
.. code-block :: python
59
59
60
60
import urllib, os
61
+
61
62
url = " https://bitbucket.org/hpk42/tox/raw/default/toxbootstrap.py"
62
- # os.environ['USETOXDEV']="1" # use tox dev version
63
- d = dict (__file__ = ' toxbootstrap.py' )
63
+ # os.environ['USETOXDEV']="1" # use tox dev version
64
+ d = dict (__file__ = " toxbootstrap.py" )
64
65
exec urllib.urlopen(url).read() in d
65
- d[' cmdline' ]([' --recreate' ])
66
+ d[" cmdline" ]([" --recreate" ])
66
67
67
68
The downloaded `toxbootstrap.py ` file downloads all necessary files to
68
69
install ``tox `` in a virtual sub environment. Notes:
@@ -105,19 +106,21 @@ Here is an example:
105
106
import py
106
107
import subprocess
107
108
109
+
108
110
def test_linkcheck (tmpdir ):
109
111
doctrees = tmpdir.join(" doctrees" )
110
112
htmldir = tmpdir.join(" html" )
111
113
subprocess.check_call(
112
- [" sphinx-build" , " -W" , " -blinkcheck" ,
113
- " -d" , str (doctrees), " ." , str (htmldir)])
114
+ [" sphinx-build" , " -W" , " -blinkcheck" , " -d" , str (doctrees), " ." , str (htmldir)]
115
+ )
116
+
114
117
115
118
def test_build_docs (tmpdir ):
116
119
doctrees = tmpdir.join(" doctrees" )
117
120
htmldir = tmpdir.join(" html" )
118
- subprocess.check_call([
119
- " sphinx-build" , " -W" , " -bhtml" ,
120
- " -d " , str (doctrees), " . " , str (htmldir)] )
121
+ subprocess.check_call(
122
+ [ " sphinx-build" , " -W" , " -bhtml" , " -d " , str (doctrees), " . " , str (htmldir)]
123
+ )
121
124
122
125
3. run ``tox -e docs `` and then you may integrate this environment
123
126
along with your other environments into Jenkins.
0 commit comments