Skip to content

Internal unit tests are not python2.6 compatible #13

@emanlove

Description

@emanlove

If you run robotframework-selenium2library's internal unit tests using Python 2.6 several tests fail due to apparent difference in the assertRaises function between 2.6 and 2.7. Here is a sample test code.

$ hg clone https://code.google.com/p/robotframework/
$ git clone https://github.com/rtomac/robotframework-selenium2library.git

$ virtualenv -p /usr/bin/python2.6 --no-site-packages clean-python26-env
$ source ~/clean-python26-env/bin/activate
(clean-python26-env)$ cd robotframwork
(clean-python26-env)~/robotframwork $ python setup.py install
(clean-python26-env)~/robotframwork $ cd ~/robotframework-selenium2library
(clean-python26-env)~/robotframework-selenium2library $ python test/run_tests.py python *ff
# ... errors...
(clean-python26-env)~/robotframework-selenium2library $ deactivate

A sample error is

ERROR: test_select_with_null_browser (locators.test_windowmanager.WindowManagerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/emanlove/s2l-tests/test/unit/locators/test_windowmanager.py", line 19, in test_select_with_null_browser
    with self.assertRaises(AssertionError):
TypeError: failUnlessRaises() takes at least 3 arguments (2 given)

Under Python 2.7 (sample test code below) there is no such issues with the unit tests

$ virtualenv -p /usr/bin/python2.7 --no-site-packages clean-python27-env
$ source ~/clean-python27-env/bin/activate
(clean-python27-env)$ cd robotframwork
(clean-python27-env)~/robotframwork $ python setup.py install
(clean-python27-env)~/robotframwork $ deactivate
(clean-python27-env)~/robotframwork $ cd ~/robotframework-selenium2library
(clean-python27-env)~/robotframework-selenium2library $ python test/run_tests.py python *ff
# ... no errors...
(clean-python27-env)~/robotframework-selenium2library $ deactivate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions