Skip to content

Commit e0647ba

Browse files
Dr-Irvjorisvandenbossche
authored andcommitted
DOC: Update contributing for test_fast, fix doc Windows build (#15523)
* DOC: Update contributing for test_fast, fix doc Windows build * add pip install for xdist
1 parent 61fa8be commit e0647ba

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

doc/make.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ def html():
202202
raise SystemExit("Building HTML failed.")
203203
try:
204204
# remove stale file
205-
os.system('rm source/html-styling.html')
206-
os.system('cd build; rm -f html/pandas.zip;')
205+
os.remove('source/html-styling.html')
206+
os.remove('build/html/pandas.zip')
207207
except:
208208
pass
209209

doc/source/contributing.rst

+20-9
Original file line numberDiff line numberDiff line change
@@ -520,15 +520,6 @@ submitting code to run the check yourself on the diff::
520520

521521
git diff master | flake8 --diff
522522

523-
Furthermore, we've written a tool to check that your commits are PEP8 great, `pip install pep8radius
524-
<https://github.com/hayd/pep8radius>`_. Look at PEP8 fixes in your branch vs master with::
525-
526-
pep8radius master --diff
527-
528-
and make these changes with::
529-
530-
pep8radius master --diff --in-place
531-
532523
Backwards Compatibility
533524
~~~~~~~~~~~~~~~~~~~~~~~
534525

@@ -611,6 +602,26 @@ Or with one of the following constructs::
611602
pytest pandas/tests/[test-module].py::[TestClass]
612603
pytest pandas/tests/[test-module].py::[TestClass]::[test_method]
613604

605+
Using `pytest-xdist <https://pypi.python.org/pypi/pytest-xdist>`_, one can
606+
speed up local testing on multicore machines. To use this feature, you will
607+
need to install `pytest-xdist` via::
608+
609+
pip install pytest-xdist
610+
611+
Two scripts are provided to assist with this. These scripts distribute
612+
testing across 4 threads.
613+
614+
On Unix variants, one can type::
615+
616+
test_fast.sh
617+
618+
On Windows, one can type::
619+
620+
test_fast.bat
621+
622+
This can significantly reduce the time it takes to locally run tests before
623+
submitting a pull request.
624+
614625
For more, see the `pytest <http://doc.pytest.org/en/latest/>`_ documentation.
615626

616627
.. versionadded:: 0.20.0

test_fast.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: test on windows
2+
set PYTHONHASHSEED=314159265
3+
pytest --skip-slow --skip-network -m "not single" -n 4 pandas

0 commit comments

Comments
 (0)