Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Do not override built-in max function

Eugenio Lacuesta613c66a034ce
diff --git a/tests/test_utils_datatypes.py b/tests/test_utils_datatypes.py
index fb2362829..7e671f627 100644
--- a/tests/test_utils_datatypes.py
+++ b/tests/test_utils_datatypes.py
@@ -258,12 +258,12 @@ class LocalCacheTest(unittest.TestCase):
self.assertEqual(cache['c'], 3)
def test_cache_without_limit(self):
- max = 10**4
+ maximum = 10**4
cache = LocalCache()
- for x in range(max):
+ for x in range(maximum):
cache[str(x)] = x
- self.assertEqual(len(cache), max)
- for x in range(max):
+ self.assertEqual(len(cache), maximum)
+ for x in range(maximum):
self.assertIn(str(x), cache)
self.assertEqual(cache[str(x)], x)