Skip to content
Permalink
Browse files

Support older version of python for expectedfail in rect tests

  • Loading branch information
timlinux committed Sep 12, 2012
1 parent bbf0c08 commit 39db80a8e0a5801aac722fc776dcaf35536a6acc
Showing with 15 additions and 2 deletions.
  1. +15 −2 tests/src/python/test_qgsrectangle.py
@@ -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)

0 comments on commit 39db80a

Please sign in to comment.
You can’t perform that action at this time.