diff options
| author | David Smith <smithdc@gmail.com> | 2023-02-01 07:13:39 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-02-01 11:04:38 +0100 |
| commit | 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 (patch) | |
| tree | 7042be9ee3aabda10ecfa8923a113388b81f34a8 /tests/cache | |
| parent | 8c660fb59239828583f17cdede3b64f208b8752c (diff) | |
Refs #33476 -- Applied Black's 2023 stable style.
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
Diffstat (limited to 'tests/cache')
| -rw-r--r-- | tests/cache/tests.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py index a01dba46d0..fcce9579d4 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -209,7 +209,7 @@ class DummyCacheTests(SimpleTestCase): "Iñtërnâtiônàlizætiøn": "Iñtërnâtiônàlizætiøn2", "ascii2": {"x": 1}, } - for (key, value) in stuff.items(): + for key, value in stuff.items(): with self.subTest(key=key): cache.set(key, value) self.assertIsNone(cache.get(key)) @@ -514,23 +514,23 @@ class BaseCacheTests: "ascii2": {"x": 1}, } # Test `set` - for (key, value) in stuff.items(): + for key, value in stuff.items(): with self.subTest(key=key): cache.set(key, value) self.assertEqual(cache.get(key), value) # Test `add` - for (key, value) in stuff.items(): + for key, value in stuff.items(): with self.subTest(key=key): self.assertIs(cache.delete(key), True) self.assertIs(cache.add(key, value), True) self.assertEqual(cache.get(key), value) # Test `set_many` - for (key, value) in stuff.items(): + for key, value in stuff.items(): self.assertIs(cache.delete(key), True) cache.set_many(stuff) - for (key, value) in stuff.items(): + for key, value in stuff.items(): with self.subTest(key=key): self.assertEqual(cache.get(key), value) @@ -704,6 +704,7 @@ class BaseCacheTests: portable caching code without making it too difficult to use production backends with more liberal key rules. Refs #6447. """ + # mimic custom ``make_key`` method being defined since the default will # never show the below warnings def func(key, *args): @@ -802,7 +803,6 @@ class BaseCacheTests: self.assertIsNone(caches["v2"].get("answer4", version=2)) def test_cache_versioning_add(self): - # add, default version = 1, but manually override version = 2 self.assertIs(cache.add("answer1", 42, version=2), True) self.assertIsNone(cache.get("answer1", version=1)) @@ -1149,7 +1149,6 @@ class BaseCacheTests: ) ) class DBCacheTests(BaseCacheTests, TransactionTestCase): - available_apps = ["cache"] def setUp(self): @@ -1468,7 +1467,6 @@ redis_excluded_caches = {"cull", "zero_cull"} class BaseMemcachedTests(BaseCacheTests): - # By default it's assumed that the client doesn't clean up connections # properly, in which case the backend must do so after each request. should_disconnect_on_close = True |
