Skip to content
This repository was archived by the owner on Mar 18, 2022. It is now read-only.

Commit 48f6bb2

Browse files
committed
Use topdown to sort find files
Because os.walk returns files in an arbitrary manner, sort dirs to ensure this order. Also tunes up tox config more.
1 parent 9d8f5c2 commit 48f6bb2

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

readthedocs_build/config/find.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
def find_all(path, filenames):
55
path = os.path.abspath(path)
6-
for root, dirs, files in os.walk(path):
6+
for root, dirs, files in os.walk(path, topdown=True):
7+
dirs.sort()
78
for filename in filenames:
89
if filename in files:
910
yield os.path.abspath(os.path.join(root, filename))

tox.ini

+7-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
11
[tox]
22
envlist =
3-
py{27,34,35,36}-unittest,
3+
py{27,34,35,36}
44
py{27,34,35,36}-integration
55
lint
6-
# docs
76

87
[tox:travis]
9-
2.7 = py27-unittest, py27-integration, lint
10-
3.4 = py34-unittest, py34-integration
11-
3.5 = py35-unittest, py35-integration
12-
3.6 = py36-unittest, py36-integration
8+
2.7 = py27, py27-integration, lint
9+
3.4 = py34, py34-integration
10+
3.5 = py35, py35-integration
11+
3.6 = py36, py36-integration
1312

1413
[testenv]
1514
deps =
1615
-r{toxinidir}/requirements/tests.txt
1716
commands =
18-
py.test {posargs}
19-
20-
[testenv:py27-integration]
21-
commands =
22-
py.test integration_tests/ -s
23-
24-
[testenv:py27-unittest]
25-
commands =
26-
py.test readthedocs_build/
17+
py.test readthedocs_build/ {posargs}
18+
integration: py.test integration_tests/ -s
2719

2820
[testenv:docs]
2921
changedir = {toxinidir}/docs

0 commit comments

Comments
 (0)