|
@@ -90,6 +90,16 @@ def function_with_decorator():
|
|
|
pass
|
|
|
|
|
|
|
|
|
+@functools.cache
|
|
|
+def function_with_cache():
|
|
|
+ pass
|
|
|
+
|
|
|
+
|
|
|
+@functools.lru_cache(maxsize=10)
|
|
|
+def function_with_lru_cache():
|
|
|
+ pass
|
|
|
+
|
|
|
+
|
|
|
class OperationWriterTests(SimpleTestCase):
|
|
|
def test_empty_signature(self):
|
|
|
operation = custom_migration_operations.operations.TestOperation()
|
|
@@ -581,6 +591,8 @@ class WriterTests(SimpleTestCase):
|
|
|
|
|
|
def test_serialize_decorated_functions(self):
|
|
|
self.assertSerializedEqual(function_with_decorator)
|
|
|
+ self.assertSerializedEqual(function_with_cache)
|
|
|
+ self.assertSerializedEqual(function_with_lru_cache)
|
|
|
|
|
|
def test_serialize_datetime(self):
|
|
|
self.assertSerializedEqual(datetime.datetime.now())
|