This commit is contained in:
Anatoly Bubenkov 2014-05-11 16:47:37 +02:00
parent be87dffccb
commit 62898e5a00
2 changed files with 4 additions and 3 deletions

View File

@ -25,13 +25,13 @@ def pytest_configure(config):
def pytest_unconfigure(config):
xml = getattr(config, '_bddcucumberjson', None)
if xml:
if xml is not None:
del config._bddcucumberjson
config.pluginmanager.unregister(xml)
class LogBDDCucumberJSON(object):
"""Log plugin for cucumber like json output."""
"""Logging plugin for cucumber like json output."""
def __init__(self, logfile):
logfile = os.path.expanduser(os.path.expandvars(logfile))

View File

@ -1,6 +1,7 @@
"""Test cucumber json output."""
import json
import textwrap
import os.path
import pytest
@ -115,6 +116,6 @@ def test_step_trace(testdir, equals_any):
"line": 1,
"name": "One passing scenario, one failing scenario",
"tags": [],
"uri": testdir.tmpdir.join('test.feature').strpath,
"uri": os.path.join(testdir.tmpdir.basename, 'test.feature'),
}
]