diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 37c51785f..6b3888dad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -131,7 +131,9 @@ or other documentation is equally important. Keyword documentation can be easily created using ``_ script. Resulting docs should be verified before the code is committed. -## Tests +Tests +~~~~~ + When submitting a pull request with a new feature or a fix, you should always include tests for your changes. These tests prove that your changes work, help prevent bugs in the future, and help document what your changes diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..002504a5b --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,52 @@ +## Prerequisites + +- [ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate +- [ ] The issue still exists against the latest `master` branch of Selenium2Library +- [ ] This is not a usage question (Those should be directed to the + [google groups](http://groups.google.com/group/robotframework-users/) or + [slack chat](https://robotframework-slack.herokuapp.com/)) +- [ ] I have attempted to find the simplest possible steps to reproduce the issue +- [ ] I have included a failing test as a pull request (Optional) + +## Steps to reproduce the issue + +1. _ +2. _ +3. _ + +## Expected behavior and actual behavior + +When I follow those steps, I see... + +I was expecting... + +## Environment + +Browsers + +- [ ] Internet Explorer (version: ) +- [ ] Google Chrome (version: ) +- [ ] Mozilla Firefox (version: ) +- [ ] Opera (version: ) +- [ ] PhantomJS (version: ) +- [ ] Safari (Mac OS X) (version: ) + +Operating System + +- [ ] Windows (version: ) +- [ ] Mac OS X (version: ) +- [ ] Linux (version: distro: ) + +Libraries + +- Robot Framework version: +- Selenium version: +- Selenium2Library ([x] Python or [ ] Jython) version: + +## Isolating and demonstrating the problem + +- [ ] This bug happens when testing a public site: [example](http://example.org/) +- [ ] The bug happens consistently across all tested browsers +- [ ] The Robot Framework Test file or snippet is attached or + at [some public site](http://pastebin.com/) +- [ ] The Test was called from: [ ] Local machine [ ] Remote Automation (Jenkins CI) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..543abf704 --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +This pull request includes a + +- [ ] An improvement +- [ ] Bug fix +- [ ] New feature + + +The following changes were made + +- +- +- + +If this is related to an existing ticket, include a link to it as well. diff --git a/build_dist.py b/build_dist.py index 6b5dd3530..894ec99a7 100644 --- a/build_dist.py +++ b/build_dist.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +from __future__ import print_function import os, sys, shutil, subprocess, argparse THIS_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -33,7 +34,7 @@ def clear_dist_folder(): def run_doc_gen(): import generate - print + print() generate.main() def run_register(args): @@ -41,7 +42,7 @@ def run_register(args): _run_setup(args.py_27_path, "register", [], False) def run_builds(args): - print + print() if not args.winonly: _run_setup(args.py_27_path, "sdist", [ "--formats=gztar,zip" ], args.release) _run_setup(args.py_26_path, "bdist_egg", [], args.release) @@ -50,12 +51,12 @@ def run_builds(args): _run_setup(args.py_27_path, "bdist_wininst", [ "--plat-name=win32" ], args.release) _run_setup(args.py_27_path, "bdist_wininst", [ "--plat-name=win-amd64" ], args.release) else: - print + print() print("Windows binary installers cannot be built on this platform!") def run_demo_packaging(): import package - print + print() package.main() def _run_setup(py_path, type, params, upload): @@ -66,7 +67,7 @@ def _run_setup(py_path, type, params, upload): if upload: setup_args.append("upload") - print + print() print("Running: %s" % ' '.join(setup_args)) returncode = subprocess.call(setup_args) if returncode != 0: diff --git a/docs/generate.py b/docs/generate.py index 08ca44889..1387b78e8 100755 --- a/docs/generate.py +++ b/docs/generate.py @@ -1,10 +1,11 @@ #!/usr/bin/env python +from __future__ import print_function from os.path import join, dirname try: from robot.libdoc import libdoc except: def main(): - print """Robot Framework 2.7 or later required for generating documentation""" + print("""Robot Framework 2.7 or later required for generating documentation""") else: def main(): libdoc(join(dirname(__file__),'..','src','Selenium2Library'), join(dirname(__file__),'Selenium2Library.html')) diff --git a/test/resources/statuschecker.py b/test/resources/statuschecker.py index 5af72b86c..a86f771ac 100755 --- a/test/resources/statuschecker.py +++ b/test/resources/statuschecker.py @@ -37,6 +37,7 @@ using a syntax 'LOG x.y:z LEVEL Actual message', which is described in detail detail in the tool documentation. """ +from __future__ import print_function import re diff --git a/test/resources/testserver/testserver.py b/test/resources/testserver/testserver.py index c67ca3c4a..5699ae98b 100644 --- a/test/resources/testserver/testserver.py +++ b/test/resources/testserver/testserver.py @@ -1,3 +1,4 @@ +from __future__ import print_function # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/336012 import SimpleHTTPServer @@ -18,7 +19,7 @@ def do_QUIT(self): def do_POST(self): # We could also process paremeters here using something like below. # length = self.headers['Content-Length'] - # print self.rfile.read(int(length)) + # print(self.rfile.read(int(length))) self.do_GET() def send_head(self): diff --git a/test/run_tests.py b/test/run_tests.py index 673db64e6..e1977a100 100755 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +from __future__ import print_function import env import os import sys diff --git a/test/run_unit_tests.py b/test/run_unit_tests.py index 3b5a0399f..0c73d217b 100755 --- a/test/run_unit_tests.py +++ b/test/run_unit_tests.py @@ -1,3 +1,4 @@ +from __future__ import print_function import env import os, sys import unittest @@ -5,7 +6,7 @@ def run_unit_tests(modules_to_run=[]): (test_module_names, test_modules) = utils.import_modules_under( - env.UNIT_TEST_DIR, include_root_package_name = False, pattern="test*.py") + env.UNIT_TEST_DIR, include_root_package_name = True, pattern="test*.py") bad_modules_to_run = [module_to_run for module_to_run in modules_to_run if module_to_run not in test_module_names]