Skip to content

Commit

Permalink
Allow tests to skip for Python < 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Oderbolz committed Jun 22, 2015
1 parent 066054a commit 6e0a1fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/capabilities_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_Capabilities(self):
)
def test_Capabilities_template(self, minVersion, maxVersion, maxArea,
tpPage, maxWayNodes, maxElements, timeout):
self._skip_if_needed()
args = {
'minVersion': minVersion,
'maxVersion': maxVersion,
Expand Down
5 changes: 5 additions & 0 deletions tests/osmapi_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import unicode_literals
from nose.tools import * # noqa
from nose.plugins.skip import SkipTest
from osmapi import OsmApi
import mock
import os
Expand Down Expand Up @@ -28,6 +29,10 @@ def setUp(self):
print(self._testMethodName)
print(self.api)

def _skip_if_needed(self):
if sys.version_info < (2, 7):
raise SkipTest

def _conn_mock(self, auth=False, filenames=None,
status=200, reason=None, args=None):
if auth:
Expand Down

0 comments on commit 6e0a1fa

Please sign in to comment.