From d4ff793158e1918132ddc48955715f37f95dd535 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 27 May 2016 11:58:39 +0200 Subject: [PATCH 1/6] Fix failing tests due to the use of deprecated assert_equals. --- tests/scenarios/po/widget_no_uri_attr.py | 2 +- tests/scenarios/po/widget_rel_uri_attr.py | 8 ++++---- tests/scenarios/po/widget_rel_uri_no_name_attr.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/scenarios/po/widget_no_uri_attr.py b/tests/scenarios/po/widget_no_uri_attr.py index edaf867..32ecfc4 100755 --- a/tests/scenarios/po/widget_no_uri_attr.py +++ b/tests/scenarios/po/widget_no_uri_attr.py @@ -10,7 +10,7 @@ class SearchResultPage(Page): @robot_alias("__name__should_have_results") def should_have_results(self, expected): len_results = len(self.find_elements("xpath=id('results')/li", required=False)) - asserts.assert_equals(len_results, int(expected), "Unexpected number of results found on %s, got %s, " + asserts.assert_equal(len_results, int(expected), "Unexpected number of results found on %s, got %s, " "expected %s" %( self.name, len_results, expected)) diff --git a/tests/scenarios/po/widget_rel_uri_attr.py b/tests/scenarios/po/widget_rel_uri_attr.py index cde1c85..5bec179 100755 --- a/tests/scenarios/po/widget_rel_uri_attr.py +++ b/tests/scenarios/po/widget_rel_uri_attr.py @@ -30,20 +30,20 @@ def click_delayed_content_button(self): def delayed_content_should_exist(self): text = self.get_text("delayed content") - asserts.assert_equals(text, "I took about 2 seconds to be inserted") + asserts.assert_equal(text, "I took about 2 seconds to be inserted") return self def delayed_content_should_exist_explicit(self): # This should raise a ValueError, since we told find_element not to wait. text = self.find_element("delayed content", wait=0).text - asserts.assert_equals(text, "I took about 2 seconds to be inserted") + asserts.assert_equal(text, "I took about 2 seconds to be inserted") return self def delayed_content_should_exist_explicit_calling_find_elements(self): # This should raise a ValueError, since we told find_element not to wait. els = self.find_elements("delayed content", wait=0) text = els[0].text - asserts.assert_equals(text, "I took about 2 seconds to be inserted") + asserts.assert_equal(text, "I took about 2 seconds to be inserted") return self def get_templated_selector_element_text(self): @@ -61,7 +61,7 @@ class SearchResultPage(Page): @robot_alias("__name__should_have_results") def should_have_results(self, expected): len_results = len(self.find_elements("results")) - asserts.assert_equals(len_results, int(expected), "Unexpected number of results found on %s, got %s, " + asserts.assert_equal(len_results, int(expected), "Unexpected number of results found on %s, got %s, " "expected %s" %(self.name, len_results, expected)) return self diff --git a/tests/scenarios/po/widget_rel_uri_no_name_attr.py b/tests/scenarios/po/widget_rel_uri_no_name_attr.py index acf3394..401ed6b 100755 --- a/tests/scenarios/po/widget_rel_uri_no_name_attr.py +++ b/tests/scenarios/po/widget_rel_uri_no_name_attr.py @@ -19,7 +19,7 @@ class WidgetSearchResultPage(Page): @robot_alias("__name__should_have_results") def should_have_results(self, expected): len_results = len(self.find_elements("xpath=id('results')/li", required=False)) - asserts.assert_equals(len_results, int(expected), "Unexpected number of results found on %s, got %s, " + asserts.assert_equal(len_results, int(expected), "Unexpected number of results found on %s, got %s, " "expected %s" %( self.name, len_results, expected)) return self From d7fb8500d8fde49cb6ca0a5457433e2453caa03b Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 27 May 2016 11:59:32 +0200 Subject: [PATCH 2/6] Add a few files that were missing in .gitignore. --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 98cbbde..99c1d72 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ RELEASE-VERSION .idea *.pyc *.egg-info +*.egg *.log report.html log.html @@ -9,4 +10,6 @@ output.xml \#*\# *~ nosetests.xml -po_log.txt \ No newline at end of file +po_log.txt +libdoc.xml + From 6e54cd48ad3bb7e47e054025a69ad0eaf3f770cd Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 27 May 2016 16:16:38 +0200 Subject: [PATCH 3/6] First steps towards py3 compatibility. --- requirements.txt | 2 +- robotpageobjects/abstractedlogger.py | 4 +- robotpageobjects/base.py | 7 +- robotpageobjects/context.py | 7 +- robotpageobjects/monkeypatches.py | 70 +++++++++---------- robotpageobjects/optionhandler.py | 17 ++--- robotpageobjects/page.py | 13 ++-- tests/basetestcase.py | 11 +-- .../scenarios/po/basepageobjects/__init__.py | 4 +- tests/scenarios/test_bad_selector.py | 4 +- tests/scenarios/test_fail.py | 2 +- .../test_find_elements_with_selector.py | 6 +- tests/scenarios/test_go_to.py | 2 +- tests/scenarios/test_is_visible.py | 2 +- tests/scenarios/test_manual_screen_shot.py | 2 +- tests/scenarios/test_no_selector.py | 4 +- ...st_page_override_without_override_class.py | 6 +- tests/scenarios/test_rel_uri_attr.py | 2 +- tests/scenarios/test_selector_self_ref.py | 6 +- tests/scenarios/test_template_passed.py | 4 +- .../scenarios/test_wait_until_not_visible.py | 2 +- tests/test_unit.py | 14 ++-- 22 files changed, 99 insertions(+), 92 deletions(-) diff --git a/requirements.txt b/requirements.txt index fb94389..65bd205 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ decorator mock==1.0.1 requests==2.1.0 -robotframework-selenium2library==1.7.2 +robotframework-selenium2library uritemplate==0.6 diff --git a/robotpageobjects/abstractedlogger.py b/robotpageobjects/abstractedlogger.py index 0cac87a..220535b 100755 --- a/robotpageobjects/abstractedlogger.py +++ b/robotpageobjects/abstractedlogger.py @@ -3,8 +3,8 @@ import robot.api.logger import robot.output.pyloggingconf as robot_logging_conf -from optionhandler import OptionHandler -from context import Context +from .optionhandler import OptionHandler +from .context import Context class Logger(object): diff --git a/robotpageobjects/base.py b/robotpageobjects/base.py index ba4b11b..f8bcf46 100755 --- a/robotpageobjects/base.py +++ b/robotpageobjects/base.py @@ -2,6 +2,7 @@ import re import importlib import inspect +import six import warnings from robot.utils import asserts @@ -124,7 +125,7 @@ def get_funcname_from_robot_alias(cls, alias, pageobject_name): """ # Look for a stub matching the alias in the aliases dict. # If we find one, return the original func name. - for fname, stub in cls._aliases.iteritems(): + for fname, stub in six.iteritems(cls._aliases): if alias == stub.replace(cls._alias_delimiter, "_" + pageobject_name + "_"): return fname # We didn't find a match, so take the class name off the end. @@ -240,7 +241,7 @@ def merge(self, other_dict, from_subclass=False): :type other_dict: dict :returns: None """ - for key, value in other_dict.iteritems(): + for key, value in six.iteritems(other_dict): overridden = False if isinstance(key, Override): key = key.obj @@ -718,7 +719,7 @@ def _element_find(self, locator, *args, **kwargs): self.driver.implicitly_wait(our_wait) - + if locator in self.selectors: locator = self.resolve_selector(locator) diff --git a/robotpageobjects/context.py b/robotpageobjects/context.py index ef20c1a..5cce3ed 100755 --- a/robotpageobjects/context.py +++ b/robotpageobjects/context.py @@ -1,9 +1,10 @@ from robot.libraries.BuiltIn import BuiltIn from robot.running.context import EXECUTION_CONTEXTS -from monkeypatches import do_monkeypatches +from .monkeypatches import do_monkeypatches do_monkeypatches() + class Context(object): """ Encapsulates the logic for whether we're in Robot or not. @@ -39,11 +40,11 @@ def in_robot(): @classmethod def set_keywords_exposed(cls): cls._keywords_exposed = True - + @classmethod def set_cache(cls, cache): cls._cache = cache - + @classmethod def get_cache(cls): return cls._cache diff --git a/robotpageobjects/monkeypatches.py b/robotpageobjects/monkeypatches.py index d387b29..ff46b29 100755 --- a/robotpageobjects/monkeypatches.py +++ b/robotpageobjects/monkeypatches.py @@ -17,8 +17,8 @@ def _make_phantomjs(self , remote , desired_capabilities , profile_dir): try: browser = self._generic_make_browser(webdriver.PhantomJS, webdriver.DesiredCapabilities.PHANTOMJS, remote, desired_capabilities) - except WebDriverException, e: - print "Couldn't connect to webdriver. WebDriverException was: " + str(e) + except WebDriverException as e: + print("Couldn't connect to webdriver. WebDriverException was: " + str(e)) browser = None tries += 1 if browser: @@ -29,34 +29,34 @@ def _make_phantomjs(self , remote , desired_capabilities , profile_dir): Selenium2Library._make_phantomjs = _make_phantomjs ### BEGIN QAR-48165 monkey patch - ### This adds consistent support for negative indexes in Robot keywords. - - __old_tef_init = TableElementFinder.__init__.__func__ - def __new_tef_init(self, *args, **kwargs): - """ - The _locator_suffixes data attribute is used at the end of built-in - locator strings used by Selenium2Library. - - Monkey patch: added support for negative indexes (QAR-48165). The - additional locator suffixes are used by the monkey-patched methods - 'find_by_row' and 'find_by_col' defined below. - """ - __old_tef_init(self, *args, **kwargs) - self._locator_suffixes[('css', 'last-row')] = [' tr:nth-last-child(%s)'] - self._locator_suffixes[('xpath', 'last-row')] = [' //tbody/tr[position()=last()-(%s-1)]'] - self._locator_suffixes[('xpath', 'row')] = [' //tbody/tr[%s]'] - self._locator_suffixes[('css', 'last-col')] = [' tr td:nth-last-child(%s)', ' tr th:nth-last-child(%s)'] - self._locator_suffixes[('xpath', 'last-col')] = [' //tbody/tr/td[position()=last()-(%s-1)]', ' //tbody/tr/td[position()=last()-(%s-1)]'] + ### This adds consistent support for negative indexes in Robot keywords. + + # __old_tef_init = TableElementFinder.__init__.__func__ + # def __new_tef_init(self, *args, **kwargs): + # """ + # The _locator_suffixes data attribute is used at the end of built-in + # locator strings used by Selenium2Library. + + # Monkey patch: added support for negative indexes (QAR-48165). The + # additional locator suffixes are used by the monkey-patched methods + # 'find_by_row' and 'find_by_col' defined below. + # """ + # __old_tef_init(self, *args, **kwargs) + # self._locator_suffixes[('css', 'last-row')] = [' tr:nth-last-child(%s)'] + # self._locator_suffixes[('xpath', 'last-row')] = [' //tbody/tr[position()=last()-(%s-1)]'] + # self._locator_suffixes[('xpath', 'row')] = [' //tbody/tr[%s]'] + # self._locator_suffixes[('css', 'last-col')] = [' tr td:nth-last-child(%s)', ' tr th:nth-last-child(%s)'] + # self._locator_suffixes[('xpath', 'last-col')] = [' //tbody/tr/td[position()=last()-(%s-1)]', ' //tbody/tr/td[position()=last()-(%s-1)]'] - TableElementFinder.__init__ = __new_tef_init + # TableElementFinder.__init__ = __new_tef_init def find_by_row(self, browser, table_locator, row, content): - """ + """ Selenium2Library locator method used by _TableElementKeywords.table_row_should_contain This in turn is used by the built-in Robot keyword 'Table Row Should Contain'. - + Monkey patch: added support for negative indexes (QAR-48165). - """ + """ location_method = "row" if "-" == row[0]: row = row[1:] @@ -68,11 +68,11 @@ def find_by_row(self, browser, table_locator, row, content): TableElementFinder.find_by_row = find_by_row def find_by_col(self, browser, table_locator, col, content): - """ + """ Selenium2Library locator method used by _TableElementKeywords.table_row_should_contain - + Monkey patch: added support for negative indexes (QAR-48165). - """ + """ location_method = "col" if "-" == col[0]: col = col[1:] @@ -80,7 +80,7 @@ def find_by_col(self, browser, table_locator, col, content): locators = self._parse_table_locator(table_locator, location_method) locators = [locator % str(col) for locator in locators] return self._search_in_locators(browser, locators, content) - + TableElementFinder.find_by_col = find_by_col def get_table_cell(self, table_locator, row, column, loglevel='INFO'): @@ -88,12 +88,12 @@ def get_table_cell(self, table_locator, row, column, loglevel='INFO'): Row and column number start from 1. Header and footer rows are included in the count. A negative row or column number can be used - to get rows counting from the end (end: -1) This means that also - cell content from header or footer rows can be obtained with this + to get rows counting from the end (end: -1) This means that also + cell content from header or footer rows can be obtained with this keyword. To understand how tables are identified, please take a look at the `introduction`. - - Monkey patch: added support for negative indexes (QAR-48165). + + Monkey patch: added support for negative indexes (QAR-48165). get_table_cell is used by the built-in keyword 'Table Cell Should Contain'. """ row = int(row) @@ -105,13 +105,13 @@ def get_table_cell(self, table_locator, row, column, loglevel='INFO'): table = self._table_element_finder.find(self._current_browser(), table_locator) if table is not None: rows = table.find_elements_by_xpath("./thead/tr") - if row_index >= len(rows) or row_index < 0: + if row_index >= len(rows) or row_index < 0: rows.extend(table.find_elements_by_xpath("./tbody/tr")) - if row_index >= len(rows) or row_index < 0: + if row_index >= len(rows) or row_index < 0: rows.extend(table.find_elements_by_xpath("./tfoot/tr")) if row_index < len(rows): columns = rows[row_index].find_elements_by_tag_name('th') - if column_index >= len(columns) or column_index < 0: + if column_index >= len(columns) or column_index < 0: columns.extend(rows[row_index].find_elements_by_tag_name('td')) if column_index < len(columns): return columns[column_index].text diff --git a/robotpageobjects/optionhandler.py b/robotpageobjects/optionhandler.py index a56b0fb..48aa4a9 100755 --- a/robotpageobjects/optionhandler.py +++ b/robotpageobjects/optionhandler.py @@ -1,9 +1,10 @@ import re import os import imp +import six -from context import Context -import exceptions +from .context import Context +from .exceptions import VarFileImportErrorError from robot.libraries.BuiltIn import BuiltIn @@ -24,7 +25,7 @@ def __new__(cls, *args, **kwargs): # Singleton pattern... if cls._instance is None: - cls._instance = super(OptionHandler, cls).__new__(cls, *args, **kwargs) + cls._instance = super().__new__(cls) cls._new_called += 1 return cls._instance @@ -49,7 +50,7 @@ def _populate_opts(self, robot=True): def _get_opts_from_robot(self): ret = {} robot_vars = BuiltIn().get_variables() - for var, val in robot_vars.iteritems(): + for var, val in six.iteritems(robot_vars): ret[self._normalize(var)] = val return ret @@ -61,8 +62,8 @@ def _get_opts_from_var_file(self): try: vars_mod = imp.load_source("vars", abs_var_file_path) - except (ImportError, IOError), e: - raise exceptions.VarFileImportErrorError( + except (ImportError, IOError) as e: + raise VarFileImportErrorError( "Couldn't import variable file: %s. Ensure it exists and is importable." % var_file_path) var_file_attrs = vars_mod.__dict__ @@ -85,13 +86,13 @@ def _normalize(self, opts): Convert an option keyname to lower-cased robot format, or convert all the keys in a dictionary to robot format. """ - if isinstance(opts, basestring): + if isinstance(opts, str): name = opts.lower() rmatch = re.search("\$\{(.+)\}", name) return rmatch.group(1) if rmatch else name else: # We're dealing with a dict - return {self._normalize(key): val for (key, val) in opts.iteritems()} + return {self._normalize(key): val for (key, val) in six.iteritems(opts)} def get(self, name, default=None): """ diff --git a/robotpageobjects/page.py b/robotpageobjects/page.py index fb0e51b..1c1f299 100755 --- a/robotpageobjects/page.py +++ b/robotpageobjects/page.py @@ -21,7 +21,10 @@ from __future__ import print_function import inspect import re -import urllib2 +try: + import urllib.request as urllib2 +except ImportError: + import urllib2 import decorator from Selenium2Library import Selenium2Library @@ -241,7 +244,7 @@ def get_keyword_names(self): def _attempt_screenshot(self): try: self.capture_page_screenshot() - except Exception, e: + except Exception as e: if e.message.find("No browser is open") != -1: pass @@ -387,7 +390,7 @@ def _vars_match_template(template, vars): :param vars: The variables to match against the template :type vars: tuple or list :returns: bool""" - keys = vars.keys() + keys = list(vars.keys()) keys.sort() template_vars = list(uritemplate.variables(template)) template_vars.sort() @@ -435,7 +438,7 @@ def _resolve_url(self, *args): first_arg = args[0] if not self._is_robot: - if isinstance(first_arg, basestring): + if isinstance(first_arg, str): # In Python, if the first argument is a string and not a dict, it's a url or path. arg_type = "url" else: @@ -574,7 +577,7 @@ class MyPageObject(PageObject): try: self.open_browser(resolved_url, self.browser, remote_url=remote_url, desired_capabilities=caps) - except (urllib2.HTTPError, WebDriverException, ValueError), e: + except (urllib2.HTTPError, WebDriverException, ValueError) as e: raise exceptions.SauceConnectionError("Unable to run Sauce job.\n%s\n" "Sauce variables were:\n" "sauce_platform: %s\n" diff --git a/tests/basetestcase.py b/tests/basetestcase.py index 18746e8..6f34639 100755 --- a/tests/basetestcase.py +++ b/tests/basetestcase.py @@ -5,6 +5,7 @@ import re import os import glob +import six from nose.tools import nottest @@ -102,7 +103,7 @@ def tearDown(self): for key in self.original_env_vars: os.environ[key] = self.original_env_vars[key] - for key in os.environ.keys(): + for key in list(os.environ): if key not in self.original_env_vars: del os.environ[key] @@ -135,7 +136,7 @@ def run_scenario(self, scenario, *args, **kwargs): if "env" in kwargs: env_vars = kwargs["env"] del kwargs["env"] - for var, val in env_vars.iteritems(): + for var, val in six.iteritems(env_vars): self.set_env(var, val) if scenario.endswith(".py"): @@ -180,14 +181,14 @@ def __repr__(self): else: dash = "-" if len(name) == 1 else "--" opt_str += dash + name.replace("_", "-") + " " + val + " " - cmd = ' '.join([base_cmd, opt_str, target]) + cmd = str.join(six.u(' '), [base_cmd, opt_str, target]) # execute command p = subprocess.Popen(cmd, cwd=working_dir, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) com = p.communicate() code = p.wait() # Out is either stdout, or stderr - out = " ".join(com) + out = str.join(six.u(" "), [str(x) for x in com]) # Splice out trailing new line out = out[:-1] return Ret(cmd, code, out) @@ -287,7 +288,7 @@ def write_var_file(self, *args, **kwargs): for i in kwargs: line = "%s = '%s'\n" % (i, kwargs[i]) f.write(line) - except Exception, e: + except Exception as e: raise Exception("Problem creating vars file: %s" % e) finally: if f: diff --git a/tests/scenarios/po/basepageobjects/__init__.py b/tests/scenarios/po/basepageobjects/__init__.py index 0e931af..237791a 100755 --- a/tests/scenarios/po/basepageobjects/__init__.py +++ b/tests/scenarios/po/basepageobjects/__init__.py @@ -1,2 +1,2 @@ -from homepage import BaseHomePage -from resultspage import BaseResultsPage \ No newline at end of file +from .homepage import BaseHomePage +from .resultspage import BaseResultsPage diff --git a/tests/scenarios/test_bad_selector.py b/tests/scenarios/test_bad_selector.py index dd5948e..865890e 100755 --- a/tests/scenarios/test_bad_selector.py +++ b/tests/scenarios/test_bad_selector.py @@ -1,4 +1,4 @@ -from po import selectors_page +from .po import selectors_page from robotpageobjects import exceptions import unittest @@ -20,4 +20,4 @@ def tearDown(self): self.page.close() if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() diff --git a/tests/scenarios/test_fail.py b/tests/scenarios/test_fail.py index 16ecb7f..749cef2 100644 --- a/tests/scenarios/test_fail.py +++ b/tests/scenarios/test_fail.py @@ -1,5 +1,5 @@ import unittest -from po import widget_rel_uri_attr +from .po import widget_rel_uri_attr class TestWidgetSearch(unittest.TestCase): diff --git a/tests/scenarios/test_find_elements_with_selector.py b/tests/scenarios/test_find_elements_with_selector.py index 3ca8d0e..9df03e3 100644 --- a/tests/scenarios/test_find_elements_with_selector.py +++ b/tests/scenarios/test_find_elements_with_selector.py @@ -1,4 +1,4 @@ -from po import selectors_page +from . import po import unittest from nose.tools import raises from robotpageobjects.exceptions import SelectorError @@ -6,7 +6,7 @@ class FindElementsTestCase(unittest.TestCase): def setUp(self): - self.page = selectors_page.Page() + self.page = po.selectors_page.Page() self.page.open() def test_find_elements(self): @@ -34,4 +34,4 @@ def tearDown(self): self.page.close() if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() diff --git a/tests/scenarios/test_go_to.py b/tests/scenarios/test_go_to.py index 1e02a99..932582a 100755 --- a/tests/scenarios/test_go_to.py +++ b/tests/scenarios/test_go_to.py @@ -1,5 +1,5 @@ import unittest -from po import widget_template +from .po import widget_template from robotpageobjects import Page diff --git a/tests/scenarios/test_is_visible.py b/tests/scenarios/test_is_visible.py index 45eb93e..97c9fb0 100755 --- a/tests/scenarios/test_is_visible.py +++ b/tests/scenarios/test_is_visible.py @@ -1,5 +1,5 @@ import unittest -from po import widget_template +from .po import widget_template class TestWidgetItem(unittest.TestCase): diff --git a/tests/scenarios/test_manual_screen_shot.py b/tests/scenarios/test_manual_screen_shot.py index c646fbc..c87caf9 100644 --- a/tests/scenarios/test_manual_screen_shot.py +++ b/tests/scenarios/test_manual_screen_shot.py @@ -1,5 +1,5 @@ import unittest -from po import widget_rel_uri_attr +from .po import widget_rel_uri_attr class TestWidgetSearch(unittest.TestCase): diff --git a/tests/scenarios/test_no_selector.py b/tests/scenarios/test_no_selector.py index 3db1ca7..b8b41a9 100755 --- a/tests/scenarios/test_no_selector.py +++ b/tests/scenarios/test_no_selector.py @@ -1,4 +1,4 @@ -from po import selectors_page +from .po import selectors_page import unittest class NoSelectorTestCase(unittest.TestCase): @@ -18,4 +18,4 @@ def tearDown(self): self.page.close() if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() diff --git a/tests/scenarios/test_page_override_without_override_class.py b/tests/scenarios/test_page_override_without_override_class.py index 97de46e..b655084 100644 --- a/tests/scenarios/test_page_override_without_override_class.py +++ b/tests/scenarios/test_page_override_without_override_class.py @@ -1,4 +1,4 @@ import os -from result_component import ParaComponent, TwoComponentsPage -class TwoComponentsSubPageWithoutOverride(TwoComponentsPage): - components = {ParaComponent: "css=p:last-child"} +from . import po +class TwoComponentsSubPageWithoutOverride(po.result_component.TwoComponentsPage): + components = {po.ParaComponent: "css=p:last-child"} diff --git a/tests/scenarios/test_rel_uri_attr.py b/tests/scenarios/test_rel_uri_attr.py index 40d64ac..a000012 100644 --- a/tests/scenarios/test_rel_uri_attr.py +++ b/tests/scenarios/test_rel_uri_attr.py @@ -1,5 +1,5 @@ import unittest -from po import widget_rel_uri_attr +from .po import widget_rel_uri_attr class TestWidgetSearch(unittest.TestCase): diff --git a/tests/scenarios/test_selector_self_ref.py b/tests/scenarios/test_selector_self_ref.py index f468427..237b0a8 100644 --- a/tests/scenarios/test_selector_self_ref.py +++ b/tests/scenarios/test_selector_self_ref.py @@ -1,5 +1,5 @@ import unittest -from po.widget_rel_uri_attr import Page +from .po.widget_rel_uri_attr import Page class SelectorSelfRefTestCase(unittest.TestCase): @@ -9,11 +9,11 @@ def setUp(self): self.p.open() def test_selector_self_ref(self): - print self.p.selectors['form label'] + print(self.p.selectors['form label']) self.p.element_should_be_visible("form label") def tearDown(self): self.p.close() if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() diff --git a/tests/scenarios/test_template_passed.py b/tests/scenarios/test_template_passed.py index fbdaf29..2c7d7ad 100644 --- a/tests/scenarios/test_template_passed.py +++ b/tests/scenarios/test_template_passed.py @@ -1,11 +1,11 @@ import unittest -from po import widget_template +from . import po class TestWidgetItem(unittest.TestCase): def test_widget_item(self): - self.widget_item_page = widget_template.WidgetItemPage() + self.widget_item_page = po.widget_template.WidgetItemPage() #self.widget_item_page.open(category="home-and-garden", id="123") self.widget_item_page.open({"category": "home-and-garden", "id": "123"}) self.widget_item_page.title_should_be("Cool Widget") diff --git a/tests/scenarios/test_wait_until_not_visible.py b/tests/scenarios/test_wait_until_not_visible.py index 1fd0f4c..eeee1d1 100755 --- a/tests/scenarios/test_wait_until_not_visible.py +++ b/tests/scenarios/test_wait_until_not_visible.py @@ -1,5 +1,5 @@ import unittest -from po import selectors_page +from .po import selectors_page class WaitUntilNotVisibleTestCase(unittest.TestCase): diff --git a/tests/test_unit.py b/tests/test_unit.py index 1b6d524..f518af5 100755 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -91,7 +91,7 @@ def test_robot_can_get_vars_from_env(self, mock_get_variables): try: handler = OptionHandler(MockPage()) self.assertEquals(handler.get("browser"), "opera") - except Exception, e: + except Exception as e: raise e finally: del os.environ["PO_BROWSER"] @@ -103,7 +103,7 @@ def test_robot_env_overrides_var_file(self, mock_get_variables): try: handler = OptionHandler(MockPage()) self.assertEquals(handler.get("author"), "Twain") - except Exception, e: + except Exception as e: raise e finally: del os.environ["PO_AUTHOR"] @@ -116,7 +116,7 @@ def test_robot_cmd_line_var_overrides_env_var(self, mock_get_variables): try: handler = OptionHandler(MockPage()) self.assertEquals(handler.get("browser"), "chrome") - except Exception, e: + except Exception as e: raise e finally: del os.environ["PO_BROWSER"] @@ -128,11 +128,11 @@ def test_robot_cmd_line_var_overrides_var_file(self, mock_get_variables): try: handler = OptionHandler(MockPage()) self.assertEquals(handler.get("author"), "Twain") - except Exception, e: + except Exception as e: raise e finally: del os.environ["PO_VAR_FILE"] - + def test_get_options_from_page_object(self): p = MockPage() p.options = {'author': 'Twain'} @@ -609,7 +609,7 @@ class P(Page):pass self.assertTrue(isinstance(service_args, list), "Service args is a list") self.assertEquals(len(service_args), 1, "Service args property has 1 member") self.assertEquals( - service_args[0], - "--cookies-file=foo.txt", + service_args[0], + "--cookies-file=foo.txt", "Service args is what we set it to be" ) From de3a69f3ebeebc40bc68eb0bd25926ecb6cadf3c Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 10 Jun 2016 15:04:16 +0200 Subject: [PATCH 4/6] Move tests folder to robotpageobjects dir to make imports work. Fix a few more tests in python 3. --- {tests => robotpageobjects/tests}/README.md | 0 {tests/scenarios => robotpageobjects/tests}/__init__.py | 0 {tests => robotpageobjects/tests}/basetestcase.py | 0 {tests => robotpageobjects/tests}/sauce_vars.py | 0 .../po => robotpageobjects/tests/scenarios}/__init__.py | 0 .../tests/scenarios/po/__init__.py | 0 .../tests}/scenarios/po/basepageobjects/__init__.py | 0 .../tests}/scenarios/po/basepageobjects/homepage.py | 0 .../tests}/scenarios/po/basepageobjects/resultspage.py | 0 .../tests}/scenarios/po/keyword_naming.py | 0 .../tests}/scenarios/po/loggingpage.py | 0 .../tests}/scenarios/po/mydbpageobjects/__init__.py | 0 .../tests}/scenarios/po/mydbpageobjects/homepage.py | 0 .../tests}/scenarios/po/mydbpageobjects/resultspage.py | 0 {tests => robotpageobjects/tests}/scenarios/po/ncbi.py | 0 {tests => robotpageobjects/tests}/scenarios/po/nouripage.py | 0 .../tests}/scenarios/po/page_with_component.py | 0 .../tests}/scenarios/po/result_component.py | 0 .../tests}/scenarios/po/selectors_duplicate.py | 0 .../tests}/scenarios/po/selectors_page.py | 0 .../tests}/scenarios/po/stacktracepage.py | 0 .../tests}/scenarios/po/widget_no_uri_attr.py | 0 .../tests}/scenarios/po/widget_rel_uri_attr.py | 0 .../tests}/scenarios/po/widget_rel_uri_no_name_attr.py | 0 .../tests}/scenarios/po/widget_template.py | 0 .../tests}/scenarios/site/category/home-and-garden/123.html | 0 {tests => robotpageobjects/tests}/scenarios/site/index.html | 0 .../tests}/scenarios/site/result.html | 0 .../tests}/scenarios/test_bad_selector.py | 4 ++-- .../test_can_call_aliased_method_with_page_name.robot | 0 .../test_can_call_aliased_method_without_page_name.robot | 0 .../test_can_call_unaliased_method_with_page_name.robot | 0 .../tests}/scenarios/test_does_not_return.robot | 0 ...age_name_for_keyword_when_2_page_objects_define_it.robot | 0 ...age_name_in_keyword_when_2_page_objects_inherit_it.robot | 0 ...to_specify_page_name_when_extending_se2lib_keyword.robot | 0 {tests => robotpageobjects/tests}/scenarios/test_fail.py | 0 {tests => robotpageobjects/tests}/scenarios/test_fail.robot | 0 .../tests}/scenarios/test_fail_se2lib_keyword.robot | 0 .../tests}/scenarios/test_find_elements_with_selector.py | 2 +- {tests => robotpageobjects/tests}/scenarios/test_go_to.py | 2 +- .../tests}/scenarios/test_go_to.robot | 0 .../tests}/scenarios/test_implicit_se_wait.py | 0 .../tests}/scenarios/test_implicit_se_wait_0.py | 0 .../tests}/scenarios/test_is_visible.py | 2 +- .../scenarios/test_location_should_be_for_absolute_path.py | 0 .../scenarios/test_location_should_be_for_relative_path.py | 0 .../tests}/scenarios/test_log_above_threshold.robot | 0 .../tests}/scenarios/test_log_at_threshold.py | 0 .../tests}/scenarios/test_log_at_threshold.robot | 0 .../scenarios/test_log_at_threshold_is_console_false.py | 0 .../tests}/scenarios/test_log_below_threshold.py | 0 .../tests}/scenarios/test_log_below_threshold.robot | 0 .../scenarios/test_log_below_threshold_is_console_false.py | 0 .../test_log_below_threshold_is_console_false.robot | 0 .../tests}/scenarios/test_manual_screen_shot.py | 2 +- .../tests}/scenarios/test_manual_screen_shot.robot | 0 .../scenarios/test_negative_index_in_table_keywords.robot | 0 .../tests}/scenarios/test_no_selector.py | 4 ++-- .../tests}/scenarios/test_no_uri.robot | 0 .../scenarios/test_page_override_without_override_class.py | 2 +- .../tests}/scenarios/test_page_with_component.robot | 0 .../scenarios/test_pass_explicit_wait_to_find_element.py | 0 .../tests}/scenarios/test_rel_uri_attr.py | 2 +- .../tests}/scenarios/test_rel_uri_attr.robot | 0 .../tests}/scenarios/test_rel_uri_attr_no_name_attr.robot | 0 .../tests}/scenarios/test_s2l_imported_multiple_a.robot | 0 .../tests}/scenarios/test_s2l_imported_multiple_b.robot | 0 .../tests}/scenarios/test_s2l_keyword_with_selector.robot | 0 {tests => robotpageobjects/tests}/scenarios/test_sauce.py | 0 .../tests}/scenarios/test_sauce.robot | 0 .../tests}/scenarios/test_se2lib_called_before_po.robot | 0 .../tests}/scenarios/test_se2lib_imported_before_po.robot | 0 .../tests}/scenarios/test_selector_self_ref.py | 2 +- .../scenarios/test_selector_with_se2lib_keyword.robot | 0 .../tests}/scenarios/test_stack_trace.robot | 0 .../tests}/scenarios/test_template_passed.py | 2 +- .../tests}/scenarios/test_template_passed.robot | 0 .../tests}/scenarios/test_templated_selector.py | 0 .../tests}/scenarios/test_templated_selector_wrong_num.py | 0 ...ng_log_warning_logs_warning_to_file_and_stdout_python.py | 0 .../tests}/scenarios/test_wait_until_not_visible.py | 6 +++--- {tests => robotpageobjects/tests}/test_functional.py | 6 +++--- {tests => robotpageobjects/tests}/test_unit.py | 2 +- {tests => robotpageobjects/tests}/vars.py | 0 85 files changed, 19 insertions(+), 19 deletions(-) rename {tests => robotpageobjects/tests}/README.md (100%) rename {tests/scenarios => robotpageobjects/tests}/__init__.py (100%) rename {tests => robotpageobjects/tests}/basetestcase.py (100%) rename {tests => robotpageobjects/tests}/sauce_vars.py (100%) rename {tests/scenarios/po => robotpageobjects/tests/scenarios}/__init__.py (100%) mode change 100644 => 100755 rename tests/__init.__.py => robotpageobjects/tests/scenarios/po/__init__.py (100%) mode change 100755 => 100644 rename {tests => robotpageobjects/tests}/scenarios/po/basepageobjects/__init__.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/basepageobjects/homepage.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/basepageobjects/resultspage.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/keyword_naming.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/loggingpage.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/mydbpageobjects/__init__.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/mydbpageobjects/homepage.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/mydbpageobjects/resultspage.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/ncbi.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/nouripage.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/page_with_component.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/result_component.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/selectors_duplicate.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/selectors_page.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/stacktracepage.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/widget_no_uri_attr.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/widget_rel_uri_attr.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/widget_rel_uri_no_name_attr.py (100%) rename {tests => robotpageobjects/tests}/scenarios/po/widget_template.py (100%) rename {tests => robotpageobjects/tests}/scenarios/site/category/home-and-garden/123.html (100%) rename {tests => robotpageobjects/tests}/scenarios/site/index.html (100%) rename {tests => robotpageobjects/tests}/scenarios/site/result.html (100%) rename {tests => robotpageobjects/tests}/scenarios/test_bad_selector.py (84%) rename {tests => robotpageobjects/tests}/scenarios/test_can_call_aliased_method_with_page_name.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_can_call_aliased_method_without_page_name.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_can_call_unaliased_method_with_page_name.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_does_not_return.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_dont_have_to_specify_page_name_for_keyword_when_2_page_objects_define_it.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_dont_have_to_specify_page_name_in_keyword_when_2_page_objects_inherit_it.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_dont_have_to_specify_page_name_when_extending_se2lib_keyword.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_fail.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_fail.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_fail_se2lib_keyword.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_find_elements_with_selector.py (95%) rename {tests => robotpageobjects/tests}/scenarios/test_go_to.py (92%) rename {tests => robotpageobjects/tests}/scenarios/test_go_to.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_implicit_se_wait.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_implicit_se_wait_0.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_is_visible.py (91%) rename {tests => robotpageobjects/tests}/scenarios/test_location_should_be_for_absolute_path.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_location_should_be_for_relative_path.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_above_threshold.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_at_threshold.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_at_threshold.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_at_threshold_is_console_false.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_below_threshold.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_below_threshold.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_below_threshold_is_console_false.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_log_below_threshold_is_console_false.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_manual_screen_shot.py (81%) rename {tests => robotpageobjects/tests}/scenarios/test_manual_screen_shot.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_negative_index_in_table_keywords.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_no_selector.py (85%) rename {tests => robotpageobjects/tests}/scenarios/test_no_uri.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_page_override_without_override_class.py (75%) rename {tests => robotpageobjects/tests}/scenarios/test_page_with_component.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_pass_explicit_wait_to_find_element.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_rel_uri_attr.py (86%) rename {tests => robotpageobjects/tests}/scenarios/test_rel_uri_attr.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_rel_uri_attr_no_name_attr.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_s2l_imported_multiple_a.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_s2l_imported_multiple_b.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_s2l_keyword_with_selector.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_sauce.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_sauce.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_se2lib_called_before_po.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_se2lib_imported_before_po.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_selector_self_ref.py (83%) rename {tests => robotpageobjects/tests}/scenarios/test_selector_with_se2lib_keyword.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_stack_trace.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_template_passed.py (92%) rename {tests => robotpageobjects/tests}/scenarios/test_template_passed.robot (100%) rename {tests => robotpageobjects/tests}/scenarios/test_templated_selector.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_templated_selector_wrong_num.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_threshold_at_warning_log_warning_logs_warning_to_file_and_stdout_python.py (100%) rename {tests => robotpageobjects/tests}/scenarios/test_wait_until_not_visible.py (91%) rename {tests => robotpageobjects/tests}/test_functional.py (99%) rename {tests => robotpageobjects/tests}/test_unit.py (99%) rename {tests => robotpageobjects/tests}/vars.py (100%) diff --git a/tests/README.md b/robotpageobjects/tests/README.md similarity index 100% rename from tests/README.md rename to robotpageobjects/tests/README.md diff --git a/tests/scenarios/__init__.py b/robotpageobjects/tests/__init__.py similarity index 100% rename from tests/scenarios/__init__.py rename to robotpageobjects/tests/__init__.py diff --git a/tests/basetestcase.py b/robotpageobjects/tests/basetestcase.py similarity index 100% rename from tests/basetestcase.py rename to robotpageobjects/tests/basetestcase.py diff --git a/tests/sauce_vars.py b/robotpageobjects/tests/sauce_vars.py similarity index 100% rename from tests/sauce_vars.py rename to robotpageobjects/tests/sauce_vars.py diff --git a/tests/scenarios/po/__init__.py b/robotpageobjects/tests/scenarios/__init__.py old mode 100644 new mode 100755 similarity index 100% rename from tests/scenarios/po/__init__.py rename to robotpageobjects/tests/scenarios/__init__.py diff --git a/tests/__init.__.py b/robotpageobjects/tests/scenarios/po/__init__.py old mode 100755 new mode 100644 similarity index 100% rename from tests/__init.__.py rename to robotpageobjects/tests/scenarios/po/__init__.py diff --git a/tests/scenarios/po/basepageobjects/__init__.py b/robotpageobjects/tests/scenarios/po/basepageobjects/__init__.py similarity index 100% rename from tests/scenarios/po/basepageobjects/__init__.py rename to robotpageobjects/tests/scenarios/po/basepageobjects/__init__.py diff --git a/tests/scenarios/po/basepageobjects/homepage.py b/robotpageobjects/tests/scenarios/po/basepageobjects/homepage.py similarity index 100% rename from tests/scenarios/po/basepageobjects/homepage.py rename to robotpageobjects/tests/scenarios/po/basepageobjects/homepage.py diff --git a/tests/scenarios/po/basepageobjects/resultspage.py b/robotpageobjects/tests/scenarios/po/basepageobjects/resultspage.py similarity index 100% rename from tests/scenarios/po/basepageobjects/resultspage.py rename to robotpageobjects/tests/scenarios/po/basepageobjects/resultspage.py diff --git a/tests/scenarios/po/keyword_naming.py b/robotpageobjects/tests/scenarios/po/keyword_naming.py similarity index 100% rename from tests/scenarios/po/keyword_naming.py rename to robotpageobjects/tests/scenarios/po/keyword_naming.py diff --git a/tests/scenarios/po/loggingpage.py b/robotpageobjects/tests/scenarios/po/loggingpage.py similarity index 100% rename from tests/scenarios/po/loggingpage.py rename to robotpageobjects/tests/scenarios/po/loggingpage.py diff --git a/tests/scenarios/po/mydbpageobjects/__init__.py b/robotpageobjects/tests/scenarios/po/mydbpageobjects/__init__.py similarity index 100% rename from tests/scenarios/po/mydbpageobjects/__init__.py rename to robotpageobjects/tests/scenarios/po/mydbpageobjects/__init__.py diff --git a/tests/scenarios/po/mydbpageobjects/homepage.py b/robotpageobjects/tests/scenarios/po/mydbpageobjects/homepage.py similarity index 100% rename from tests/scenarios/po/mydbpageobjects/homepage.py rename to robotpageobjects/tests/scenarios/po/mydbpageobjects/homepage.py diff --git a/tests/scenarios/po/mydbpageobjects/resultspage.py b/robotpageobjects/tests/scenarios/po/mydbpageobjects/resultspage.py similarity index 100% rename from tests/scenarios/po/mydbpageobjects/resultspage.py rename to robotpageobjects/tests/scenarios/po/mydbpageobjects/resultspage.py diff --git a/tests/scenarios/po/ncbi.py b/robotpageobjects/tests/scenarios/po/ncbi.py similarity index 100% rename from tests/scenarios/po/ncbi.py rename to robotpageobjects/tests/scenarios/po/ncbi.py diff --git a/tests/scenarios/po/nouripage.py b/robotpageobjects/tests/scenarios/po/nouripage.py similarity index 100% rename from tests/scenarios/po/nouripage.py rename to robotpageobjects/tests/scenarios/po/nouripage.py diff --git a/tests/scenarios/po/page_with_component.py b/robotpageobjects/tests/scenarios/po/page_with_component.py similarity index 100% rename from tests/scenarios/po/page_with_component.py rename to robotpageobjects/tests/scenarios/po/page_with_component.py diff --git a/tests/scenarios/po/result_component.py b/robotpageobjects/tests/scenarios/po/result_component.py similarity index 100% rename from tests/scenarios/po/result_component.py rename to robotpageobjects/tests/scenarios/po/result_component.py diff --git a/tests/scenarios/po/selectors_duplicate.py b/robotpageobjects/tests/scenarios/po/selectors_duplicate.py similarity index 100% rename from tests/scenarios/po/selectors_duplicate.py rename to robotpageobjects/tests/scenarios/po/selectors_duplicate.py diff --git a/tests/scenarios/po/selectors_page.py b/robotpageobjects/tests/scenarios/po/selectors_page.py similarity index 100% rename from tests/scenarios/po/selectors_page.py rename to robotpageobjects/tests/scenarios/po/selectors_page.py diff --git a/tests/scenarios/po/stacktracepage.py b/robotpageobjects/tests/scenarios/po/stacktracepage.py similarity index 100% rename from tests/scenarios/po/stacktracepage.py rename to robotpageobjects/tests/scenarios/po/stacktracepage.py diff --git a/tests/scenarios/po/widget_no_uri_attr.py b/robotpageobjects/tests/scenarios/po/widget_no_uri_attr.py similarity index 100% rename from tests/scenarios/po/widget_no_uri_attr.py rename to robotpageobjects/tests/scenarios/po/widget_no_uri_attr.py diff --git a/tests/scenarios/po/widget_rel_uri_attr.py b/robotpageobjects/tests/scenarios/po/widget_rel_uri_attr.py similarity index 100% rename from tests/scenarios/po/widget_rel_uri_attr.py rename to robotpageobjects/tests/scenarios/po/widget_rel_uri_attr.py diff --git a/tests/scenarios/po/widget_rel_uri_no_name_attr.py b/robotpageobjects/tests/scenarios/po/widget_rel_uri_no_name_attr.py similarity index 100% rename from tests/scenarios/po/widget_rel_uri_no_name_attr.py rename to robotpageobjects/tests/scenarios/po/widget_rel_uri_no_name_attr.py diff --git a/tests/scenarios/po/widget_template.py b/robotpageobjects/tests/scenarios/po/widget_template.py similarity index 100% rename from tests/scenarios/po/widget_template.py rename to robotpageobjects/tests/scenarios/po/widget_template.py diff --git a/tests/scenarios/site/category/home-and-garden/123.html b/robotpageobjects/tests/scenarios/site/category/home-and-garden/123.html similarity index 100% rename from tests/scenarios/site/category/home-and-garden/123.html rename to robotpageobjects/tests/scenarios/site/category/home-and-garden/123.html diff --git a/tests/scenarios/site/index.html b/robotpageobjects/tests/scenarios/site/index.html similarity index 100% rename from tests/scenarios/site/index.html rename to robotpageobjects/tests/scenarios/site/index.html diff --git a/tests/scenarios/site/result.html b/robotpageobjects/tests/scenarios/site/result.html similarity index 100% rename from tests/scenarios/site/result.html rename to robotpageobjects/tests/scenarios/site/result.html diff --git a/tests/scenarios/test_bad_selector.py b/robotpageobjects/tests/scenarios/test_bad_selector.py similarity index 84% rename from tests/scenarios/test_bad_selector.py rename to robotpageobjects/tests/scenarios/test_bad_selector.py index 865890e..fc80ffa 100755 --- a/tests/scenarios/test_bad_selector.py +++ b/robotpageobjects/tests/scenarios/test_bad_selector.py @@ -1,4 +1,4 @@ -from .po import selectors_page +from robotpageobjects.tests.scenarios.po import selectors_page from robotpageobjects import exceptions import unittest @@ -11,7 +11,7 @@ def test_bad_selector(self): found = False try: self.page.find_element("foobar") - except exceptions.SelectorError, e: + except exceptions.SelectorError as e: msg_found = e.message.find("not a valid locator") != -1 self.assertTrue(msg_found, "ValueError should detect that the locator looks like a selector.") diff --git a/tests/scenarios/test_can_call_aliased_method_with_page_name.robot b/robotpageobjects/tests/scenarios/test_can_call_aliased_method_with_page_name.robot similarity index 100% rename from tests/scenarios/test_can_call_aliased_method_with_page_name.robot rename to robotpageobjects/tests/scenarios/test_can_call_aliased_method_with_page_name.robot diff --git a/tests/scenarios/test_can_call_aliased_method_without_page_name.robot b/robotpageobjects/tests/scenarios/test_can_call_aliased_method_without_page_name.robot similarity index 100% rename from tests/scenarios/test_can_call_aliased_method_without_page_name.robot rename to robotpageobjects/tests/scenarios/test_can_call_aliased_method_without_page_name.robot diff --git a/tests/scenarios/test_can_call_unaliased_method_with_page_name.robot b/robotpageobjects/tests/scenarios/test_can_call_unaliased_method_with_page_name.robot similarity index 100% rename from tests/scenarios/test_can_call_unaliased_method_with_page_name.robot rename to robotpageobjects/tests/scenarios/test_can_call_unaliased_method_with_page_name.robot diff --git a/tests/scenarios/test_does_not_return.robot b/robotpageobjects/tests/scenarios/test_does_not_return.robot similarity index 100% rename from tests/scenarios/test_does_not_return.robot rename to robotpageobjects/tests/scenarios/test_does_not_return.robot diff --git a/tests/scenarios/test_dont_have_to_specify_page_name_for_keyword_when_2_page_objects_define_it.robot b/robotpageobjects/tests/scenarios/test_dont_have_to_specify_page_name_for_keyword_when_2_page_objects_define_it.robot similarity index 100% rename from tests/scenarios/test_dont_have_to_specify_page_name_for_keyword_when_2_page_objects_define_it.robot rename to robotpageobjects/tests/scenarios/test_dont_have_to_specify_page_name_for_keyword_when_2_page_objects_define_it.robot diff --git a/tests/scenarios/test_dont_have_to_specify_page_name_in_keyword_when_2_page_objects_inherit_it.robot b/robotpageobjects/tests/scenarios/test_dont_have_to_specify_page_name_in_keyword_when_2_page_objects_inherit_it.robot similarity index 100% rename from tests/scenarios/test_dont_have_to_specify_page_name_in_keyword_when_2_page_objects_inherit_it.robot rename to robotpageobjects/tests/scenarios/test_dont_have_to_specify_page_name_in_keyword_when_2_page_objects_inherit_it.robot diff --git a/tests/scenarios/test_dont_have_to_specify_page_name_when_extending_se2lib_keyword.robot b/robotpageobjects/tests/scenarios/test_dont_have_to_specify_page_name_when_extending_se2lib_keyword.robot similarity index 100% rename from tests/scenarios/test_dont_have_to_specify_page_name_when_extending_se2lib_keyword.robot rename to robotpageobjects/tests/scenarios/test_dont_have_to_specify_page_name_when_extending_se2lib_keyword.robot diff --git a/tests/scenarios/test_fail.py b/robotpageobjects/tests/scenarios/test_fail.py similarity index 100% rename from tests/scenarios/test_fail.py rename to robotpageobjects/tests/scenarios/test_fail.py diff --git a/tests/scenarios/test_fail.robot b/robotpageobjects/tests/scenarios/test_fail.robot similarity index 100% rename from tests/scenarios/test_fail.robot rename to robotpageobjects/tests/scenarios/test_fail.robot diff --git a/tests/scenarios/test_fail_se2lib_keyword.robot b/robotpageobjects/tests/scenarios/test_fail_se2lib_keyword.robot similarity index 100% rename from tests/scenarios/test_fail_se2lib_keyword.robot rename to robotpageobjects/tests/scenarios/test_fail_se2lib_keyword.robot diff --git a/tests/scenarios/test_find_elements_with_selector.py b/robotpageobjects/tests/scenarios/test_find_elements_with_selector.py similarity index 95% rename from tests/scenarios/test_find_elements_with_selector.py rename to robotpageobjects/tests/scenarios/test_find_elements_with_selector.py index 9df03e3..1aae0ff 100644 --- a/tests/scenarios/test_find_elements_with_selector.py +++ b/robotpageobjects/tests/scenarios/test_find_elements_with_selector.py @@ -1,4 +1,4 @@ -from . import po +from robotpageobjects.tests.scenarios import po import unittest from nose.tools import raises from robotpageobjects.exceptions import SelectorError diff --git a/tests/scenarios/test_go_to.py b/robotpageobjects/tests/scenarios/test_go_to.py similarity index 92% rename from tests/scenarios/test_go_to.py rename to robotpageobjects/tests/scenarios/test_go_to.py index 932582a..19e1008 100755 --- a/tests/scenarios/test_go_to.py +++ b/robotpageobjects/tests/scenarios/test_go_to.py @@ -1,5 +1,5 @@ import unittest -from .po import widget_template +from robotpageobjects.tests.scenarios.po import widget_template from robotpageobjects import Page diff --git a/tests/scenarios/test_go_to.robot b/robotpageobjects/tests/scenarios/test_go_to.robot similarity index 100% rename from tests/scenarios/test_go_to.robot rename to robotpageobjects/tests/scenarios/test_go_to.robot diff --git a/tests/scenarios/test_implicit_se_wait.py b/robotpageobjects/tests/scenarios/test_implicit_se_wait.py similarity index 100% rename from tests/scenarios/test_implicit_se_wait.py rename to robotpageobjects/tests/scenarios/test_implicit_se_wait.py diff --git a/tests/scenarios/test_implicit_se_wait_0.py b/robotpageobjects/tests/scenarios/test_implicit_se_wait_0.py similarity index 100% rename from tests/scenarios/test_implicit_se_wait_0.py rename to robotpageobjects/tests/scenarios/test_implicit_se_wait_0.py diff --git a/tests/scenarios/test_is_visible.py b/robotpageobjects/tests/scenarios/test_is_visible.py similarity index 91% rename from tests/scenarios/test_is_visible.py rename to robotpageobjects/tests/scenarios/test_is_visible.py index 97c9fb0..7ecf692 100755 --- a/tests/scenarios/test_is_visible.py +++ b/robotpageobjects/tests/scenarios/test_is_visible.py @@ -1,5 +1,5 @@ import unittest -from .po import widget_template +from robotpageobjects.tests.scenarios.po import widget_template class TestWidgetItem(unittest.TestCase): diff --git a/tests/scenarios/test_location_should_be_for_absolute_path.py b/robotpageobjects/tests/scenarios/test_location_should_be_for_absolute_path.py similarity index 100% rename from tests/scenarios/test_location_should_be_for_absolute_path.py rename to robotpageobjects/tests/scenarios/test_location_should_be_for_absolute_path.py diff --git a/tests/scenarios/test_location_should_be_for_relative_path.py b/robotpageobjects/tests/scenarios/test_location_should_be_for_relative_path.py similarity index 100% rename from tests/scenarios/test_location_should_be_for_relative_path.py rename to robotpageobjects/tests/scenarios/test_location_should_be_for_relative_path.py diff --git a/tests/scenarios/test_log_above_threshold.robot b/robotpageobjects/tests/scenarios/test_log_above_threshold.robot similarity index 100% rename from tests/scenarios/test_log_above_threshold.robot rename to robotpageobjects/tests/scenarios/test_log_above_threshold.robot diff --git a/tests/scenarios/test_log_at_threshold.py b/robotpageobjects/tests/scenarios/test_log_at_threshold.py similarity index 100% rename from tests/scenarios/test_log_at_threshold.py rename to robotpageobjects/tests/scenarios/test_log_at_threshold.py diff --git a/tests/scenarios/test_log_at_threshold.robot b/robotpageobjects/tests/scenarios/test_log_at_threshold.robot similarity index 100% rename from tests/scenarios/test_log_at_threshold.robot rename to robotpageobjects/tests/scenarios/test_log_at_threshold.robot diff --git a/tests/scenarios/test_log_at_threshold_is_console_false.py b/robotpageobjects/tests/scenarios/test_log_at_threshold_is_console_false.py similarity index 100% rename from tests/scenarios/test_log_at_threshold_is_console_false.py rename to robotpageobjects/tests/scenarios/test_log_at_threshold_is_console_false.py diff --git a/tests/scenarios/test_log_below_threshold.py b/robotpageobjects/tests/scenarios/test_log_below_threshold.py similarity index 100% rename from tests/scenarios/test_log_below_threshold.py rename to robotpageobjects/tests/scenarios/test_log_below_threshold.py diff --git a/tests/scenarios/test_log_below_threshold.robot b/robotpageobjects/tests/scenarios/test_log_below_threshold.robot similarity index 100% rename from tests/scenarios/test_log_below_threshold.robot rename to robotpageobjects/tests/scenarios/test_log_below_threshold.robot diff --git a/tests/scenarios/test_log_below_threshold_is_console_false.py b/robotpageobjects/tests/scenarios/test_log_below_threshold_is_console_false.py similarity index 100% rename from tests/scenarios/test_log_below_threshold_is_console_false.py rename to robotpageobjects/tests/scenarios/test_log_below_threshold_is_console_false.py diff --git a/tests/scenarios/test_log_below_threshold_is_console_false.robot b/robotpageobjects/tests/scenarios/test_log_below_threshold_is_console_false.robot similarity index 100% rename from tests/scenarios/test_log_below_threshold_is_console_false.robot rename to robotpageobjects/tests/scenarios/test_log_below_threshold_is_console_false.robot diff --git a/tests/scenarios/test_manual_screen_shot.py b/robotpageobjects/tests/scenarios/test_manual_screen_shot.py similarity index 81% rename from tests/scenarios/test_manual_screen_shot.py rename to robotpageobjects/tests/scenarios/test_manual_screen_shot.py index c87caf9..00074de 100644 --- a/tests/scenarios/test_manual_screen_shot.py +++ b/robotpageobjects/tests/scenarios/test_manual_screen_shot.py @@ -1,5 +1,5 @@ import unittest -from .po import widget_rel_uri_attr +from robotpageobjects.tests.scenarios.po import widget_rel_uri_attr class TestWidgetSearch(unittest.TestCase): diff --git a/tests/scenarios/test_manual_screen_shot.robot b/robotpageobjects/tests/scenarios/test_manual_screen_shot.robot similarity index 100% rename from tests/scenarios/test_manual_screen_shot.robot rename to robotpageobjects/tests/scenarios/test_manual_screen_shot.robot diff --git a/tests/scenarios/test_negative_index_in_table_keywords.robot b/robotpageobjects/tests/scenarios/test_negative_index_in_table_keywords.robot similarity index 100% rename from tests/scenarios/test_negative_index_in_table_keywords.robot rename to robotpageobjects/tests/scenarios/test_negative_index_in_table_keywords.robot diff --git a/tests/scenarios/test_no_selector.py b/robotpageobjects/tests/scenarios/test_no_selector.py similarity index 85% rename from tests/scenarios/test_no_selector.py rename to robotpageobjects/tests/scenarios/test_no_selector.py index b8b41a9..5d1b2f7 100755 --- a/tests/scenarios/test_no_selector.py +++ b/robotpageobjects/tests/scenarios/test_no_selector.py @@ -1,4 +1,4 @@ -from .po import selectors_page +from robotpageobjects.tests.scenarios.po import selectors_page import unittest class NoSelectorTestCase(unittest.TestCase): @@ -10,7 +10,7 @@ def test_no_selector(self): msg_found = False try: self.page.find_element("xpath=asdf") - except ValueError, e: + except ValueError as e: msg_found = e.message.find("did not match any elements") != -1 self.assertTrue(msg_found, "ValueError should detect that the locator looks like a locator.") diff --git a/tests/scenarios/test_no_uri.robot b/robotpageobjects/tests/scenarios/test_no_uri.robot similarity index 100% rename from tests/scenarios/test_no_uri.robot rename to robotpageobjects/tests/scenarios/test_no_uri.robot diff --git a/tests/scenarios/test_page_override_without_override_class.py b/robotpageobjects/tests/scenarios/test_page_override_without_override_class.py similarity index 75% rename from tests/scenarios/test_page_override_without_override_class.py rename to robotpageobjects/tests/scenarios/test_page_override_without_override_class.py index b655084..ec0c5d2 100644 --- a/tests/scenarios/test_page_override_without_override_class.py +++ b/robotpageobjects/tests/scenarios/test_page_override_without_override_class.py @@ -1,4 +1,4 @@ import os -from . import po +from robotpageobjects.tests.scenarios import po class TwoComponentsSubPageWithoutOverride(po.result_component.TwoComponentsPage): components = {po.ParaComponent: "css=p:last-child"} diff --git a/tests/scenarios/test_page_with_component.robot b/robotpageobjects/tests/scenarios/test_page_with_component.robot similarity index 100% rename from tests/scenarios/test_page_with_component.robot rename to robotpageobjects/tests/scenarios/test_page_with_component.robot diff --git a/tests/scenarios/test_pass_explicit_wait_to_find_element.py b/robotpageobjects/tests/scenarios/test_pass_explicit_wait_to_find_element.py similarity index 100% rename from tests/scenarios/test_pass_explicit_wait_to_find_element.py rename to robotpageobjects/tests/scenarios/test_pass_explicit_wait_to_find_element.py diff --git a/tests/scenarios/test_rel_uri_attr.py b/robotpageobjects/tests/scenarios/test_rel_uri_attr.py similarity index 86% rename from tests/scenarios/test_rel_uri_attr.py rename to robotpageobjects/tests/scenarios/test_rel_uri_attr.py index a000012..ac94431 100644 --- a/tests/scenarios/test_rel_uri_attr.py +++ b/robotpageobjects/tests/scenarios/test_rel_uri_attr.py @@ -1,5 +1,5 @@ import unittest -from .po import widget_rel_uri_attr +from robotpageobjects.tests.scenarios.po import widget_rel_uri_attr class TestWidgetSearch(unittest.TestCase): diff --git a/tests/scenarios/test_rel_uri_attr.robot b/robotpageobjects/tests/scenarios/test_rel_uri_attr.robot similarity index 100% rename from tests/scenarios/test_rel_uri_attr.robot rename to robotpageobjects/tests/scenarios/test_rel_uri_attr.robot diff --git a/tests/scenarios/test_rel_uri_attr_no_name_attr.robot b/robotpageobjects/tests/scenarios/test_rel_uri_attr_no_name_attr.robot similarity index 100% rename from tests/scenarios/test_rel_uri_attr_no_name_attr.robot rename to robotpageobjects/tests/scenarios/test_rel_uri_attr_no_name_attr.robot diff --git a/tests/scenarios/test_s2l_imported_multiple_a.robot b/robotpageobjects/tests/scenarios/test_s2l_imported_multiple_a.robot similarity index 100% rename from tests/scenarios/test_s2l_imported_multiple_a.robot rename to robotpageobjects/tests/scenarios/test_s2l_imported_multiple_a.robot diff --git a/tests/scenarios/test_s2l_imported_multiple_b.robot b/robotpageobjects/tests/scenarios/test_s2l_imported_multiple_b.robot similarity index 100% rename from tests/scenarios/test_s2l_imported_multiple_b.robot rename to robotpageobjects/tests/scenarios/test_s2l_imported_multiple_b.robot diff --git a/tests/scenarios/test_s2l_keyword_with_selector.robot b/robotpageobjects/tests/scenarios/test_s2l_keyword_with_selector.robot similarity index 100% rename from tests/scenarios/test_s2l_keyword_with_selector.robot rename to robotpageobjects/tests/scenarios/test_s2l_keyword_with_selector.robot diff --git a/tests/scenarios/test_sauce.py b/robotpageobjects/tests/scenarios/test_sauce.py similarity index 100% rename from tests/scenarios/test_sauce.py rename to robotpageobjects/tests/scenarios/test_sauce.py diff --git a/tests/scenarios/test_sauce.robot b/robotpageobjects/tests/scenarios/test_sauce.robot similarity index 100% rename from tests/scenarios/test_sauce.robot rename to robotpageobjects/tests/scenarios/test_sauce.robot diff --git a/tests/scenarios/test_se2lib_called_before_po.robot b/robotpageobjects/tests/scenarios/test_se2lib_called_before_po.robot similarity index 100% rename from tests/scenarios/test_se2lib_called_before_po.robot rename to robotpageobjects/tests/scenarios/test_se2lib_called_before_po.robot diff --git a/tests/scenarios/test_se2lib_imported_before_po.robot b/robotpageobjects/tests/scenarios/test_se2lib_imported_before_po.robot similarity index 100% rename from tests/scenarios/test_se2lib_imported_before_po.robot rename to robotpageobjects/tests/scenarios/test_se2lib_imported_before_po.robot diff --git a/tests/scenarios/test_selector_self_ref.py b/robotpageobjects/tests/scenarios/test_selector_self_ref.py similarity index 83% rename from tests/scenarios/test_selector_self_ref.py rename to robotpageobjects/tests/scenarios/test_selector_self_ref.py index 237b0a8..82a3885 100644 --- a/tests/scenarios/test_selector_self_ref.py +++ b/robotpageobjects/tests/scenarios/test_selector_self_ref.py @@ -1,5 +1,5 @@ import unittest -from .po.widget_rel_uri_attr import Page +from robotpageobjects.tests.scenarios.po.widget_rel_uri_attr import Page class SelectorSelfRefTestCase(unittest.TestCase): diff --git a/tests/scenarios/test_selector_with_se2lib_keyword.robot b/robotpageobjects/tests/scenarios/test_selector_with_se2lib_keyword.robot similarity index 100% rename from tests/scenarios/test_selector_with_se2lib_keyword.robot rename to robotpageobjects/tests/scenarios/test_selector_with_se2lib_keyword.robot diff --git a/tests/scenarios/test_stack_trace.robot b/robotpageobjects/tests/scenarios/test_stack_trace.robot similarity index 100% rename from tests/scenarios/test_stack_trace.robot rename to robotpageobjects/tests/scenarios/test_stack_trace.robot diff --git a/tests/scenarios/test_template_passed.py b/robotpageobjects/tests/scenarios/test_template_passed.py similarity index 92% rename from tests/scenarios/test_template_passed.py rename to robotpageobjects/tests/scenarios/test_template_passed.py index 2c7d7ad..a88c338 100644 --- a/tests/scenarios/test_template_passed.py +++ b/robotpageobjects/tests/scenarios/test_template_passed.py @@ -1,5 +1,5 @@ import unittest -from . import po +from robotpageobjects.tests.scenarios import po class TestWidgetItem(unittest.TestCase): diff --git a/tests/scenarios/test_template_passed.robot b/robotpageobjects/tests/scenarios/test_template_passed.robot similarity index 100% rename from tests/scenarios/test_template_passed.robot rename to robotpageobjects/tests/scenarios/test_template_passed.robot diff --git a/tests/scenarios/test_templated_selector.py b/robotpageobjects/tests/scenarios/test_templated_selector.py similarity index 100% rename from tests/scenarios/test_templated_selector.py rename to robotpageobjects/tests/scenarios/test_templated_selector.py diff --git a/tests/scenarios/test_templated_selector_wrong_num.py b/robotpageobjects/tests/scenarios/test_templated_selector_wrong_num.py similarity index 100% rename from tests/scenarios/test_templated_selector_wrong_num.py rename to robotpageobjects/tests/scenarios/test_templated_selector_wrong_num.py diff --git a/tests/scenarios/test_threshold_at_warning_log_warning_logs_warning_to_file_and_stdout_python.py b/robotpageobjects/tests/scenarios/test_threshold_at_warning_log_warning_logs_warning_to_file_and_stdout_python.py similarity index 100% rename from tests/scenarios/test_threshold_at_warning_log_warning_logs_warning_to_file_and_stdout_python.py rename to robotpageobjects/tests/scenarios/test_threshold_at_warning_log_warning_logs_warning_to_file_and_stdout_python.py diff --git a/tests/scenarios/test_wait_until_not_visible.py b/robotpageobjects/tests/scenarios/test_wait_until_not_visible.py similarity index 91% rename from tests/scenarios/test_wait_until_not_visible.py rename to robotpageobjects/tests/scenarios/test_wait_until_not_visible.py index eeee1d1..162b255 100755 --- a/tests/scenarios/test_wait_until_not_visible.py +++ b/robotpageobjects/tests/scenarios/test_wait_until_not_visible.py @@ -1,5 +1,5 @@ import unittest -from .po import selectors_page +from robotpageobjects.tests.scenarios.po import selectors_page class WaitUntilNotVisibleTestCase(unittest.TestCase): @@ -21,7 +21,7 @@ def test_wait_until_element_not_visible_throws_exception(self): try: self.p.click_element("delayed-content-button") self.p.wait_until_element_is_not_visible("para-to-be-hidden", 8) - except Exception, e: + except Exception as e: self.assertTrue(isinstance(e, AssertionError)) self.assertIn("still matched after", e.message) @@ -29,7 +29,7 @@ def test_wait_for_element_not_visible_throws_exception(self): try: self.p.click_element("delayed-content-button") self.p.wait_for(lambda: not self.p.is_visible("para-to-be-hidden"), 8, 'Element did not disappear') - except Exception, e: + except Exception as e: self.assertIn("Element did not disappear", e.msg) def tearDown(self): diff --git a/tests/test_functional.py b/robotpageobjects/tests/test_functional.py similarity index 99% rename from tests/test_functional.py rename to robotpageobjects/tests/test_functional.py index b1d5305..86bf577 100755 --- a/tests/test_functional.py +++ b/robotpageobjects/tests/test_functional.py @@ -7,10 +7,10 @@ from nose.tools import raises from robotpageobjects import Page, exceptions -from scenarios.po.result_component import ResultPage, ResultPageWithDOMStrategyLocator, HomePage, \ +from robotpageobjects.tests.scenarios.po.result_component import ResultPage, ResultPageWithDOMStrategyLocator, HomePage, \ HomePageWithDOMAdvancedToggler, TwoComponentsPage, ParaComponent, TwoComponentsSubPage -from scenarios.po.loggingpage import LoggingPage -from basetestcase import BaseTestCase +from robotpageobjects.tests.scenarios.po.loggingpage import LoggingPage +from robotpageobjects.tests.basetestcase import BaseTestCase class SmokeTestCase(BaseTestCase): diff --git a/tests/test_unit.py b/robotpageobjects/tests/test_unit.py similarity index 99% rename from tests/test_unit.py rename to robotpageobjects/tests/test_unit.py index f518af5..2d17b57 100755 --- a/tests/test_unit.py +++ b/robotpageobjects/tests/test_unit.py @@ -8,7 +8,7 @@ import selenium from selenium import webdriver -from basetestcase import BaseTestCase +from robotpageobjects.tests.basetestcase import BaseTestCase from robotpageobjects import exceptions from robotpageobjects.page import Page, _Keywords, Override, not_keyword from robotpageobjects.optionhandler import OptionHandler diff --git a/tests/vars.py b/robotpageobjects/tests/vars.py similarity index 100% rename from tests/vars.py rename to robotpageobjects/tests/vars.py From bb432ca24b3cb26e83394beb8a53b2d780c79ba6 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 10 Jun 2016 15:06:44 +0200 Subject: [PATCH 5/6] Fix travis nosetest paths. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3d443ad..20ec5be 100755 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ python: install: - pip install . script: - - nosetests -vs --with-xunit tests/test_unit.py tests/test_functional.py + - nosetests -vs --with-xunit robotpageobjects/tests/test_unit.py robotpageobjects/tests/test_functional.py deploy: provider: pypi user: hellmanj From 158cd48ec2d2e93ee1ae01645dc5d4b576a4e47c Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 10 Jun 2016 15:10:24 +0200 Subject: [PATCH 6/6] Add six to requirements.txt. --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 65bd205..bc9fbc3 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ decorator +six mock==1.0.1 requests==2.1.0 robotframework-selenium2library