# Path: app/util.py
# SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production'
# def cached_function(func: Callable[..., Any]) -> Callable[..., Any]:
#     def wrapper(*args: Any) -> Any:


import random
import unittest
from app import util



def rand(base: int) -> float:
    return base + random.random()


@util.cached_function
def cached_rand(base: int) -> float:
    return rand(base)


class TestCachedFunction(unittest.TestCase):
    def setUp(self) -> None:

# Path: app/util.py
# SHOULD_CACHE = os.environ.get('ENV', 'development') == 'production'
# def cached_function(func: Callable[..., Any]) -> Callable[..., Any]:
#     def wrapper(*args: Any) -> Any:


# Path: app/tests/test_util.py
import random
import unittest
from app import util




def rand(base: int) -> float:
    return base + random.random()


@util.cached_function
def cached_rand(base: int) -> float:
    return rand(base)


class TestCachedFunction(unittest.TestCase):
    def setUp(self) -> None:

        self.orig_cache = util.SHOULD_CACHE