File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
parsl/tests/test_python_apps Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1+ import pytest
2+
13import parsl
24from parsl .app .app import python_app
5+ from parsl .config import Config
6+ from parsl .dataflow .memoization import BasicMemoizer
7+ from parsl .executors .threads import ThreadPoolExecutor
8+
9+
10+ def local_config ():
11+ return Config (
12+ executors = [ThreadPoolExecutor ()],
13+ memoizer = BasicMemoizer ()
14+ )
315
416
517@python_app (cache = True )
@@ -12,8 +24,9 @@ def raise_exception_nocache(x, cache=True):
1224 raise RuntimeError ("exception from raise_exception_nocache" )
1325
1426
27+ @pytest .mark .local
1528def test_python_memoization (n = 2 ):
16- """Test Python memoization of exceptions, with cache=True"""
29+ """Test BasicMemoizer memoization of exceptions, with cache=True"""
1730 x = raise_exception_cache (0 )
1831
1932 # wait for x to be done
@@ -27,8 +40,9 @@ def test_python_memoization(n=2):
2740 assert fut .exception () is x .exception (), "Memoized exception should have been memoized"
2841
2942
43+ @pytest .mark .local
3044def test_python_no_memoization (n = 2 ):
31- """Test Python non-memoization of exceptions, with cache=False"""
45+ """Test BasicMemoizer non-memoization of exceptions, with cache=False"""
3246 x = raise_exception_nocache (0 )
3347
3448 # wait for x to be done
You can’t perform that action at this time.
0 commit comments