Skip to content

Commit 6c2cc66

Browse files
committed
add test
related to tensorflow
1 parent 57ca0b3 commit 6c2cc66

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_functions.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -267,3 +267,15 @@ def wrapper_1(func):
267267
@wrapper_2
268268
def test_func():
269269
pass
270+
271+
def test_functools_lru_cache():
272+
import sys
273+
from functools import lru_cache
274+
275+
@lru_cache()
276+
def cached_func():
277+
pass
278+
279+
type_entity = getattr(sys.modules['functools'], '_lru_cache_wrapper')
280+
assert isinstance(cached_func, type_entity), "lru_cache should not be using the python-based version"
281+

0 commit comments

Comments
 (0)