From 624c87efeffc7f53da0f2da336e9281b684b63a1 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 29 Apr 2016 15:32:10 +0200 Subject: [PATCH 1/2] Add more testing. This initially ignores every warning we hit right now. --- .travis.yml | 5 ++++- setup.cfg | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 setup.cfg diff --git a/.travis.yml b/.travis.yml index dd8370b6cf1b06..e73d1dc380cce0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,10 @@ python: - "2.7" - "3.5" install: + - pip install flake8 - pip install pytest - pip install ./html5lib - pip install pytest-travis-fold -script: py.test manifest +script: + - py.test manifest + - flake8 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000000000..1f7e47e388e851 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[flake8] +ignore = E124,E128,E221,E226,E231,E251,E265,E302,E303,E402,E901,F401,F821,F841 +max-line-length = 141 +exclude = html5lib,py,pytest,pywebsocket,six,webdriver,wptserve From 24be79d32fc83bf5793965dd8959cc2adc74060b Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 29 Apr 2016 16:24:16 +0200 Subject: [PATCH 2/2] Cleanup generate_html. --- runner/report.py | 39 +++++++++++++++++---------------------- setup.cfg | 2 +- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/runner/report.py b/runner/report.py index 60a0cef851068f..f91607e412a86c 100644 --- a/runner/report.py +++ b/runner/report.py @@ -272,28 +272,23 @@ def result_bodies(UAs, results_by_test): def generate_html(UAs, results_by_test): """Generate all the HTML output""" - doc = h(h.html([ - h.head(h.meta(charset="utf8"), - h.title("Implementation Report"), - h.link(href="report.css", rel="stylesheet")), - h.body(h.h1("Implementation Report"), - h.h2("Summary"), - summary(UAs, results_by_test), - h.h2("Full Results"), - h.table( - h.thead( - h.tr( - h.th("Test"), - h.th("Subtest"), - [h.th(UA) for UA in sorted(UAs)] - ) - ), - result_bodies(UAs, results_by_test) - ) - ) - ])) - - return doc + return h(h.html( + h.head( + h.meta(charset="utf8"), + h.title("Implementation Report"), + h.link(href="report.css", rel="stylesheet")), + h.body( + h.h1("Implementation Report"), + h.h2("Summary"), + summary(UAs, results_by_test), + h.h2("Full Results"), + h.table( + h.thead( + h.tr( + h.th("Test"), + h.th("Subtest"), + [h.th(UA) for UA in sorted(UAs)])), + result_bodies(UAs, results_by_test))))) def main(filenames): diff --git a/setup.cfg b/setup.cfg index 1f7e47e388e851..6c2645c2d4b864 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,4 @@ [flake8] -ignore = E124,E128,E221,E226,E231,E251,E265,E302,E303,E402,E901,F401,F821,F841 +ignore = E128,E221,E226,E231,E251,E265,E302,E303,E402,E901,F401,F821,F841 max-line-length = 141 exclude = html5lib,py,pytest,pywebsocket,six,webdriver,wptserve