Benjamin Schubert pushed to branch bschubert/remove-pytest-runner at BuildStream / buildstream
Commits:
-
2b3f5306
by Benjamin Schubert at 2018-10-24T14:14:55Z
-
c04d4e55
by Benjamin Schubert at 2018-10-24T14:15:43Z
1 changed file:
Changes:
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 |
# Authors:
|
19 | 19 |
# Tristan Van Berkom <tristan vanberkom codethink co uk>
|
20 | 20 |
|
21 |
+from distutils.errors import DistutilsError
|
|
21 | 22 |
import os
|
22 | 23 |
import re
|
23 | 24 |
import shutil
|
... | ... | @@ -227,11 +228,22 @@ class PyTest(TestCommand): |
227 | 228 |
"""Defines a pytest command class to run tests from setup.py"""
|
228 | 229 |
|
229 | 230 |
user_options = TestCommand.user_options + [
|
230 |
- ("pytest-args=", "a", "Arguments to pass to pytest")]
|
|
231 |
+ ("addopts=", None, "Arguments to pass to pytest"),
|
|
232 |
+ ('index-url=''Test failed: %s' % test.result
|
|
256 |
+ self.announce(msg, log.ERROR)
|
|
257 |
+ raise DistutilsError(msg)
|
|
258 |
+ |
|
259 |
+ @property
|
|
260 |
+ def _argv(self):
|
|
261 |
+ import shlex
|
|
262 |
+ |
|
263 |
+ return ["pytest"] + shlex.split(self.addopts)
|
|
244 | 264 |
|
245 | 265 |
|
246 | 266 |
def get_cmdclass():
|