Skip to content

Instantly share code, notes, and snippets.

@notmyname
Created October 5, 2016 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmyname/586fab93aab607d36b2bc6861b638afb to your computer and use it in GitHub Desktop.
Save notmyname/586fab93aab607d36b2bc6861b638afb to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import json
import sys
json_data = sys.stdin.read()
parsed = json.loads(json_data)
capabilities = parsed['components']['object']['required']
d = {}
for c in capabilities:
d[c] = parsed['capabilities'][c]['tests'].keys()
for c, tests in d.items():
print c
for t in tests:
print ' ', t
print '--------------------'
capabilities = parsed['components']['object']['advisory']
d = {}
for c in capabilities:
d[c] = parsed['capabilities'][c]['tests'].keys()
for c, tests in d.items():
print c
for t in tests:
print ' ', t
for n in `ls *py`; do echo $n; grep -B4 'def test_' $n | cut -d' ' -f '2-' | grep -e ' test_' -e idempotent; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment