summaryrefslogtreecommitdiff
path: root/conftest.py
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2014-08-27 18:43:11 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2014-08-27 18:43:11 -0700
commitd7216c20dede113b4a76a97c9151c569f6be0c6e (patch)
tree41fa928a8cf989d7028cd73baffc60ab83a50a8e /conftest.py
parent3e4820a0ff223021981cc8f794c1d830a30b63b6 (diff)
downloadpyscss-d7216c20dede113b4a76a97c9151c569f6be0c6e.tar.gz
Don't show py.test stuff in the traceback for file tests.
Diffstat (limited to 'conftest.py')
-rw-r--r--conftest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/conftest.py b/conftest.py
index d5c5bd6..014b4d8 100644
--- a/conftest.py
+++ b/conftest.py
@@ -88,6 +88,11 @@ class SassItem(pytest.Item):
self.fspath.relto(self.session.fspath),
)
+ def _prunetraceback(self, excinfo):
+ # Traceback implements __getitem__, but list implements __getslice__,
+ # which wins in Python 2
+ excinfo.traceback = excinfo.traceback.cut(__file__)
+
def runtest(self):
scss_file = self.fspath
css_file = scss_file.new(ext='css')
@@ -113,5 +118,4 @@ class SassItem(pytest.Item):
actual = actual.strip('\n')
expected = expected.strip('\n')
- # TODO how do i make py.test not show the traceback here
assert expected == actual