Skip to content

Commit

Permalink
Adapting to new pytest json report format
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Dec 30, 2016
1 parent 6ea972c commit a61f1bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,15 @@ def build_getters_support_matrix(app):
drivers.append(driver)
with open(filename, 'r') as f:
data = json.loads(f.read())
for test in data.get('included', {}):
match = regex_name.search(test['attributes']['name'])
for test in data["report"]["tests"]:
match = regex_name.search(test['name'])
if match:
method = match.group(1)
else:
continue
if method in EXCLUDE_IN_REPORT:
continue
result = test['attributes']['outcome']
result = test['outcome']

if method in METHOD_ALIASES.keys():
method = METHOD_ALIASES[method]
Expand Down
1 change: 1 addition & 0 deletions docs/support/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ _ EOS JunOS IOS-XR FortiOS IBM
**Atomic Changes** Yes Yes Yes No [#c2]_ No [#c2]_ Yes/No [#c5]_ Yes Yes Yes/No [#c5]_ No Yes
**Rollback** Yes [#c2]_ Yes Yes Yes Yes [#c2]_ Yes/No [#c5]_ Yes No Yes No Yes
===================== ========== ===== ========== ============== ============= ============== ============== ============== ============== ======== ========

.. [#c1] Hand-crafted by the API as the device doesn't support the feature.
.. [#c2] Not supported but emulated. Check caveats.
.. [#c3] Check the caveats, this is a dangerous operation in this device.
Expand Down
2 changes: 1 addition & 1 deletion docs/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function process_driver {
pip install -r requirements-dev.txt

set +e
py.test --cov=./ -vs --json=report.json test/unit/test_getters.py
py.test -c /dev/null --cov=./ -vs --json=report.json test/unit/test_getters.py
set -e

cp report.json $TEST_RESULTS_PATH/$1.json
Expand Down

0 comments on commit a61f1bb

Please sign in to comment.