Showing 1 of 3 files from the diff.
Other files ignored by Codecov

@@ -18,7 +18,7 @@
Loading
18 18
    miss_callable=None,
19 19
    key_generator_callable=None,
20 20
    store_result=True,
21 -
    cache_exceptions=False,
21 +
    cache_exceptions=None,
22 22
    cache_alias=DEFAULT_CACHE_ALIAS,
23 23
):
24 24
    """Decorator for memoizing function calls where we use the
@@ -34,8 +34,8 @@
Loading
34 34
    :arg key_generator_callable: Custom cache key name generator.
35 35
    :arg bool store_result: If you know the result is not important, just
36 36
    that the cache blocked it from running repeatedly, set this to False.
37 -
    :arg bool cache_exceptions: To store any raised exceptions in the cache
38 -
    set this to True, to raise them immediately, set to False.
37 +
    :arg bool cache_exceptions: Any exception raised from classes provided in
38 +
    this list will be cached, all other will be propagated.
39 39
    :arg string cache_alias: The cache alias to use; defaults to 'default'.
40 40
41 41
    Usage::
@@ -124,7 +124,7 @@
Loading
124 124
                try:
125 125
                    result = func(*args, **kwargs)
126 126
                except Exception as exception:
127 -
                    if cache_exceptions:
127 +
                    if exception.__class__ in (cache_exceptions or []):
128 128
                        result = exception
129 129
                    else:
130 130
                        raise exception
@@ -140,6 +140,9 @@
Loading
140 140
                    miss_callable(*args, **kwargs)
141 141
            elif hit_callable:
142 142
                hit_callable(*args, **kwargs)
143 +
144 +
            if result.__class__ in (cache_exceptions or []):
145 +
                raise result
143 146
            return result
144 147
145 148
        def invalidate(*args, **kwargs):
Files Coverage
src/cache_memoize/__init__.py 100.00%
Project Totals (1 files) 100.00%
93.3
3.7=.7
TRAVIS_OS_NAME=linux
93.1
3.5=.5
TRAVIS_OS_NAME=linux
93.4
TRAVIS_OS_NAME=linux
pypy3=

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading