summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@play-bow.org>2013-07-08 02:15:35 -0700
committerBob Halley <halley@play-bow.org>2013-07-08 02:15:35 -0700
commitf903cdacb1b2950cda766cdf6ba3a9da03390937 (patch)
tree3e6708ac2d561dd5286095b8f7458a66cea56e91
parent62576b2fa40d71a20db621ccb9ad757f1b62bdd9 (diff)
parent6f32f59bb503be21632722a85dd20cc65f1f976d (diff)
downloaddnspython-f903cdacb1b2950cda766cdf6ba3a9da03390937.tar.gz
Merge pull request #29 from jcollie/master
Preserve Python 2.4 compatibility by switching back to the old style string formatting.
-rw-r--r--tests/grange.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/grange.py b/tests/grange.py
index cbfc896..1bb7dbb 100644
--- a/tests/grange.py
+++ b/tests/grange.py
@@ -72,7 +72,7 @@ class GRangeTestCase(unittest.TestCase):
start = 2
stop = 1
step = 1
- dns.grange.from_text('{0}-{1}/{2}'.format(start, stop, step))
+ dns.grange.from_text('%d-%d/%d' % (start, stop, step))
self.assertRaises(AssertionError, bad)
def testFailFromText2(self):
@@ -80,7 +80,7 @@ class GRangeTestCase(unittest.TestCase):
start = '-1'
stop = 3
step = 1
- dns.grange.from_text('{0}-{1}/{2}'.format(start, stop, step))
+ dns.grange.from_text('%s-%d/%d' % (start, stop, step))
self.assertRaises(dns.exception.SyntaxError, bad)
def testFailFromText2(self):
@@ -88,7 +88,7 @@ class GRangeTestCase(unittest.TestCase):
start = 1
stop = 4
step = '-2'
- dns.grange.from_text('{0}-{1}/{2}'.format(start, stop, step))
+ dns.grange.from_text('%d-%d/%s' % (start, stop, step))
self.assertRaises(dns.exception.SyntaxError, bad)
if __name__ == '__main__':