• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mtreinish / stestr / 127
68%

Build:
DEFAULT BRANCH: master
Ran 01 Feb 2017 07:09PM UTC
Jobs 5
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
127

push

travis-ci

mtreinish
Add --no-discover option to stestr run

This commit adds an option to stestr run, --no-discover/-n, to bypass
test discovery and just directly run a single python callable. This
will make it easier (and much faster) for people iterating on a single
test to just run it directly.

An implementation note here is that subunit.run is called with
subprocess instead of manually calling the subunit.run module. This is
for 2 reasons (which are related) first is that all the glue code in
stestr itself (mostly in stestr.commands.load) is expecting this, since
it is how we execute subunit.run in the case with discovery. Changing
this assumption would mean having to add an additional code path to
stestr load for an internal stream but not from a subprocess.

The second is that the subunit.run api makes it difficult to handle the
streams in a serialized manner. The subunit.run module is basically just
a wrapper for testtools.run which is itself just a wrapper for
unittest.main. In that call path there are a lot of assumptions made
about the input and output types and the control available on those
objects. (for example an io.BytesIO for the output stream does not work,
but real files do) It makes it difficult to have tests run directly in
python. The closest I got to making this work inside a single python
interpreter was to use os.pipe() for the stream and launch a
threading.Thread() to call subunit.run and write the output into
the pipe and then pass the reader side of the pipe to
stestr.commands.load. However even doing this caused an IOError on exit
because something in the subunit.run call path was deleting the file it
was passed.
Jobs
ID Job ID Ran Files Coverage
1 127.1 (TOXENV=py34) 01 Feb 2017 07:09PM UTC 0
Travis Job 127.1
2 127.2 (TOXENV=py35) 01 Feb 2017 07:09PM UTC 0
Travis Job 127.2
3 127.3 (TOXENV=py36) 01 Feb 2017 07:09PM UTC 0
Travis Job 127.3
4 127.4 (TOXENV=pep8) 01 Feb 2017 07:09PM UTC 0
Travis Job 127.4
5 127.5 (TOXENV=py27) 01 Feb 2017 07:09PM UTC 0
Travis Job 127.5
Source Files on build 127
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #127
  • 8585d7eb on github
  • Prev Build on master (#126)
  • Next Build on master (#129)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc