summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/pytest/extra
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/tools/pytest/extra
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/tools/pytest/extra')
-rw-r--r--testing/web-platform/tests/tools/pytest/extra/get_issues.py74
-rw-r--r--testing/web-platform/tests/tools/pytest/extra/setup-py.test/setup.py11
2 files changed, 85 insertions, 0 deletions
diff --git a/testing/web-platform/tests/tools/pytest/extra/get_issues.py b/testing/web-platform/tests/tools/pytest/extra/get_issues.py
new file mode 100644
index 000000000..6437ba4c3
--- /dev/null
+++ b/testing/web-platform/tests/tools/pytest/extra/get_issues.py
@@ -0,0 +1,74 @@
+import json
+import py
+import textwrap
+
+issues_url = "http://bitbucket.org/api/1.0/repositories/pytest-dev/pytest/issues"
+
+import requests
+
+def get_issues():
+ chunksize = 50
+ start = 0
+ issues = []
+ while 1:
+ post_data = {"accountname": "pytest-dev",
+ "repo_slug": "pytest",
+ "start": start,
+ "limit": chunksize}
+ print ("getting from", start)
+ r = requests.get(issues_url, params=post_data)
+ data = r.json()
+ issues.extend(data["issues"])
+ if start + chunksize >= data["count"]:
+ return issues
+ start += chunksize
+
+kind2num = "bug enhancement task proposal".split()
+
+status2num = "new open resolved duplicate invalid wontfix".split()
+
+def main(args):
+ cachefile = py.path.local(args.cache)
+ if not cachefile.exists() or args.refresh:
+ issues = get_issues()
+ cachefile.write(json.dumps(issues))
+ else:
+ issues = json.loads(cachefile.read())
+
+ open_issues = [x for x in issues
+ if x["status"] in ("new", "open")]
+
+ def kind_and_id(x):
+ kind = x["metadata"]["kind"]
+ return kind2num.index(kind), len(issues)-int(x["local_id"])
+ open_issues.sort(key=kind_and_id)
+ report(open_issues)
+
+def report(issues):
+ for issue in issues:
+ metadata = issue["metadata"]
+ priority = issue["priority"]
+ title = issue["title"]
+ content = issue["content"]
+ kind = metadata["kind"]
+ status = issue["status"]
+ id = issue["local_id"]
+ link = "https://bitbucket.org/pytest-dev/pytest/issue/%s/" % id
+ print("----")
+ print(status, kind, link)
+ print(title)
+ #print()
+ #lines = content.split("\n")
+ #print ("\n".join(lines[:3]))
+ #if len(lines) > 3 or len(content) > 240:
+ # print ("...")
+
+if __name__ == "__main__":
+ import argparse
+ parser = argparse.ArgumentParser("process bitbucket issues")
+ parser.add_argument("--refresh", action="store_true",
+ help="invalidate cache, refresh issues")
+ parser.add_argument("--cache", action="store", default="issues.json",
+ help="cache file")
+ args = parser.parse_args()
+ main(args)
diff --git a/testing/web-platform/tests/tools/pytest/extra/setup-py.test/setup.py b/testing/web-platform/tests/tools/pytest/extra/setup-py.test/setup.py
new file mode 100644
index 000000000..d0560ce1f
--- /dev/null
+++ b/testing/web-platform/tests/tools/pytest/extra/setup-py.test/setup.py
@@ -0,0 +1,11 @@
+import sys
+from distutils.core import setup
+
+if __name__ == "__main__":
+ if "sdist" not in sys.argv[1:]:
+ raise ValueError("please use 'pytest' pypi package instead of 'py.test'")
+ setup(
+ name="py.test",
+ version="0.0",
+ description="please use 'pytest' for installation",
+ )