diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-05-03 20:18:05 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-05-03 20:18:05 +0200 |
| commit | 00c0d3c44ebc4e3461653ec96cd47023cc0a6e5b (patch) | |
| tree | 050b07dde4949a585f59572eaa1d79d4c3427064 /tests/regressiontests/cache | |
| parent | 10cf3c64273db407402ea9723569dfc8d059e186 (diff) | |
Made warning assertions work with or without -Wall python switch
Diffstat (limited to 'tests/regressiontests/cache')
| -rw-r--r-- | tests/regressiontests/cache/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/regressiontests/cache/tests.py b/tests/regressiontests/cache/tests.py index f0e2977b31..780718b487 100644 --- a/tests/regressiontests/cache/tests.py +++ b/tests/regressiontests/cache/tests.py @@ -469,11 +469,13 @@ class BaseCacheTests(object): try: with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") # memcached does not allow whitespace or control characters in keys self.cache.set('key with spaces', 'value') self.assertEqual(len(w), 2) self.assertTrue(isinstance(w[0].message, CacheKeyWarning)) with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") # memcached limits key length to 250 self.cache.set('a' * 251, 'value') self.assertEqual(len(w), 1) |
