Skip to content

Commit

Permalink
Support older version of python for expectedfail in rect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Sep 12, 2012
1 parent bbf0c08 commit 39db80a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/src/python/test_qgsrectangle.py
Expand Up @@ -5,12 +5,25 @@
QgsPoint)

from utilities import getQgisTestApp
import sys

# support python < 2.7 via unittest2
# needed for expected failure decorator
if sys.version_info[0:2] < (2,7):
try:
from unittest2 import TestCase, expectedFailure
except ImportError:
print "You need to install unittest2 to run the salt tests"
sys.exit(1)
else:
from unittest import TestCase, expectedFailure

QGISAPP, CANVAS, IFACE, PARENT = getQgisTestApp()

class TestQgsRectangle(unittest.TestCase):
class TestQgsRectangle(TestCase):

# Because isEmpty() is not returning expected result in 9b0fee3
@unittest.expectedFailure
@expectedFailure
def testCtor(self):
rect = QgsRectangle(5.0, 5.0, 10.0, 10.0)

Expand Down

0 comments on commit 39db80a

Please sign in to comment.