File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 8
8
pytest .skip ("Skipping Tests JIT is disabled" , allow_module_level = True )
9
9
10
10
11
- def test_cache_save ():
12
- def get_cache_fnames_ref ():
13
- cache .clear ()
14
- cache ._enable ()
15
- stump (np .random .rand (10 ), 3 )
16
- cache_files = cache ._get_cache ()
17
- cache .clear ()
18
- return cache_files
19
-
20
- def get_cache_fnames_comp ():
21
- cache .clear ()
22
- cache .save ()
23
- stump (np .random .rand (10 ), 3 )
24
- cache_files = cache ._get_cache ()
25
- cache .clear ()
26
- return cache_files
27
-
28
- ref_cache_files = get_cache_fnames_ref ()
29
- comp_cache_files = get_cache_fnames_comp ()
30
-
31
- # check nbc files
32
- ref_nbc = [fname for fname in ref_cache_files if fname .endswith (".nbc" )]
33
- comp_nbc = [fname for fname in comp_cache_files if fname .endswith (".nbc" )]
34
- assert sorted (ref_nbc ) == sorted (comp_nbc )
35
-
36
- # check nbi files
37
- ref_nbi = [fname for fname in ref_cache_files if fname .endswith (".nbi" )]
38
- comp_nbi = [fname for fname in comp_cache_files if fname .endswith (".nbi" )]
39
- assert set (ref_nbi ).issubset (comp_nbi )
40
-
41
-
42
11
def test_cache_save_after_clear ():
43
12
T = np .random .rand (10 )
44
13
m = 3
You can’t perform that action at this time.
0 commit comments