Skip to content

Commit

Permalink
Skip template leak test when not CPython2.7, #452.
Browse files Browse the repository at this point in the history
  • Loading branch information
rduplain committed Apr 24, 2012
1 parent 148c50a commit 2262ce4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions flask/testsuite/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \

This comment has been minimized.

Copy link
@redian

redian Apr 13, 2013

Contributor

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

This comment has been minimized.

Copy link
@untitaker

untitaker Apr 13, 2013

Contributor

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

This comment has been minimized.

Copy link
@redian

redian Apr 13, 2013

Contributor

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.

not hasattr(sys, 'pypy_translation_info'):
with self.assert_no_leak():
for x in xrange(10):
fire()


def suite():
Expand Down

1 comment on commit 2262ce4

@rduplain
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.