changeset 17947:f945caa5e963

test-pathencode: more aggressively check for python < 2.6
author Bryan O'Sullivan <bryano@fb.com>
date Thu, 15 Nov 2012 22:24:36 -0800
parents 1e13b1184292
children bc75638bea78
files tests/test-pathencode.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-pathencode.py	Thu Nov 15 15:16:41 2012 -0800
+++ b/tests/test-pathencode.py	Thu Nov 15 22:24:36 2012 -0800
@@ -10,6 +10,9 @@
 import binascii, itertools, math, os, random, sys, time
 import collections
 
+if sys.version_info[:2] < (2, 6):
+    sys.exit(0)
+
 def hybridencode(path):
     return store._hybridencode(path, True)
 
@@ -186,5 +189,5 @@
     if runtests(rng, seed, count):
         sys.exit(1)
 
-if __name__ == '__main__' and sys.version_info[:2] >= (2, 6):
+if __name__ == '__main__':
     main()