Browse files

Skip template leak test when not CPython2.7, #452.

  • Loading branch information...
1 parent 148c50a commit 2262ce4915aec0dfffa8e71244ebe10f72d11111 @rduplain rduplain committed Apr 23, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 flask/testsuite/regression.py
View
9 flask/testsuite/regression.py
@@ -72,9 +72,12 @@ def fire():
# Trigger caches
fire()
- with self.assert_no_leak():
- for x in xrange(10):
- fire()
+ # This test only works on CPython 2.7.
+ if sys.version_info >= (2, 7) and \
@redian
redian added a note Apr 13, 2013

Hello @rduplain the test fails for me using cpython 2.7.4.
Would it be sensible to change your if statement? to:
if sys.version_info >= (2, 7) and hasattr(sys, 'pypy_translation_info'):

Thanks

@untitaker
The Pallets Projects member

@mitsuhiko said he will remove the entire test at some point.

@redian
redian added a note Apr 13, 2013

I did read that comment but that was said about a year ago and its still there.
I personally dont prefer things to fail.
Anyway will just get rid of it in my local repo.

Thanks untitaker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ not hasattr(sys, 'pypy_translation_info'):
+ with self.assert_no_leak():
+ for x in xrange(10):
+ fire()
def suite():

1 comment on commit 2262ce4

@rduplain

The issue is that the test is too specific to Python implementation.

Please sign in to comment.