Skip to content

Commit

Permalink
adding python 2.7 support (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
studioj committed Aug 25, 2019
1 parent e801ffd commit c7d2dc6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cache:
directories:
- $HOME/.cache/pip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"Operating System :: OS Independent",
"Topic :: Utilities",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
Expand Down
5 changes: 5 additions & 0 deletions tests/test_wait_for_it_to_be_equal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

import wait_for_it_to

try:
a = TimeoutError()
except NameError:
TimeoutError = wait_for_it_to.TimeoutError


class TestWaitForItToBeEqual(unittest.TestCase):
def test_wait_for_it_to_be_equal_immediately_returns_when_func_evals_to_the_same_String(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/test_wait_for_it_to_be_false.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

import wait_for_it_to

try:
a = TimeoutError()
except NameError:
TimeoutError = wait_for_it_to.TimeoutError

class TestWaitForItToBeFalse(unittest.TestCase):
def test_wait_for_it_to_be_false_immediately_returns_when_func_evals_to_false(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/test_wait_for_it_to_be_true.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

import wait_for_it_to

try:
a = TimeoutError()
except NameError:
TimeoutError = wait_for_it_to.TimeoutError

class TestWaitForItToBeTrue(unittest.TestCase):
def test_wait_for_it_to_has_a_version(self):
Expand Down
6 changes: 6 additions & 0 deletions wait_for_it_to/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

from wait_for_it_to._version import __version__, __version_info__

try:
a = TimeoutError()
except NameError:
class TimeoutError(Exception):
pass


def be_true(func, timeout=10):
"""
Expand Down

0 comments on commit c7d2dc6

Please sign in to comment.