Skip to content

Commit

Permalink
Copy Twisted 16.3's bin/trial and run with it
Browse files Browse the repository at this point in the history
  • Loading branch information
redapple committed Aug 30, 2016
1 parent 85f9233 commit 367375f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
23 changes: 23 additions & 0 deletions bin/trial
@@ -0,0 +1,23 @@
#!/usr/bin/env python
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
import os, sys

try:
import _preamble
except ImportError:
try:
sys.exc_clear()
except AttributeError:
# exc_clear() (and the requirement for it) has been removed from Py3
pass

# begin chdir armor
sys.path[:] = map(os.path.abspath, sys.path)
# end chdir armor

sys.path.insert(0, os.path.abspath(os.getcwd()))
print(sys.path)

from twisted.scripts.trial import run
run()
6 changes: 2 additions & 4 deletions tox.ini
Expand Up @@ -9,14 +9,12 @@ envlist = py27

[testenv]
deps =
# equivalent to -rreqs/requirements-latest.txt
twisted
scrapy
-rreqs/requirements-latest.txt
-rreqs/requirements-tests.txt

commands =
coverage erase
coverage run --branch {envbindir}/trial {posargs:scrapyd}
coverage run --branch {toxinidir}/bin/trial {posargs:scrapyd}
coverage report

[testenv:precise]
Expand Down

0 comments on commit 367375f

Please sign in to comment.