Skip to content

Commit 8933610

Browse files
authored
Merge branch 'master' into dynamic-schedule
2 parents 5d6fa6b + 46de174 commit 8933610

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ matrix:
66
env: TOXENV=py35
77
- python: "3.6"
88
env: TOXENV=py36
9+
- os: linux
10+
python: 3.8
11+
env: TOXENV=py38
912
- os: linux
1013
dist: xenial
1114
python: 3.7

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ jobs:
5959
pip install -U tox
6060
displayName: 'Install dependencies'
6161
- script: tox -e py
62-
displayName: 'Run Tox'
62+
displayName: 'Run Tox'

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifier =
2020
Programming Language :: Python :: 3.5
2121
Programming Language :: Python :: 3.6
2222
Programming Language :: Python :: 3.7
23+
Programming Language :: Python :: 3.8
2324
Topic :: Software Development :: Testing
2425
Topic :: Software Development :: Quality Assurance
2526
project_urls =

stestr/repository/memory.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from extras import try_import
1616

17-
OrderedDict = try_import('collections.OrderedDict', dict)
1817
from io import BytesIO
1918
from operator import methodcaller
2019

@@ -23,6 +22,8 @@
2322

2423
from stestr.repository import abstract as repository
2524

25+
OrderedDict = try_import('collections.OrderedDict', dict)
26+
2627

2728
class RepositoryFactory(repository.AbstractRepositoryFactory):
2829
"""A factory that can initialise and open memory repositories.
@@ -152,8 +153,8 @@ def _handle_test(self, test_dict):
152153
duration_delta = stop - start
153154
duration_seconds = (
154155
(duration_delta.microseconds + (
155-
duration_delta.seconds + duration_delta.days
156-
* 24 * 3600) * 10 ** 6) / 10.0 ** 6)
156+
duration_delta.seconds +
157+
duration_delta.days * 24 * 3600) * 10 ** 6) / 10.0 ** 6)
157158
self._repository._times[test_dict['id']] = duration_seconds
158159

159160
def stopTestRun(self):

stestr/scheduler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ def partition_tests(test_ids, concurrency, repository, group_callback,
109109
:return: A list where each element is a distinct subset of test_ids,
110110
and the union of all the elements is equal to set(test_ids).
111111
"""
112+
def noop(_):
113+
return None
114+
112115
_group_callback = group_callback
113116
partitions = [list() for i in range(concurrency)]
114117
timed_partitions = [[0.0, partition] for partition in partitions]
@@ -123,7 +126,7 @@ def partition_tests(test_ids, concurrency, repository, group_callback,
123126
# Group tests: generate group_id -> test_ids.
124127
group_ids = collections.defaultdict(list)
125128
if _group_callback is None:
126-
group_callback = lambda _: None
129+
group_callback = noop
127130
else:
128131
group_callback = _group_callback
129132
for test_id in test_ids:

test-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# of appearance. Changing the order has an impact on the overall integration
33
# process, which may cause wedges in the gate later.
44

5-
hacking<0.12,>=0.11.0 # Apache-2.0
5+
hacking<1.2.0,>=1.1.0
66
sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
77
sphinx!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD
88
mock>=2.0 # BSD
99
subunit2sql>=1.8.0
1010
coverage>=4.0 # Apache-2.0
1111
ddt>=1.0.1 # MIT
12-
doc8>=0.8.0 # Apache-2.0
12+
doc8>=0.8.0 # Apache-2.0

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 1.6
3-
envlist = py37,py36,py35,py34,py27,pep8
3+
envlist = py38,py37,py36,py35,py34,py27,pep8
44
skipsdist = True
55

66
[testenv]

0 commit comments

Comments
 (0)