Skip to content

Commit 8784b22

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent af994a2 commit 8784b22

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

tests/test_cache_executor_serial.py

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,15 @@ def test_executor_working_directory(self):
5555
def test_executor_function(self):
5656
fs1 = Future()
5757
q = Queue()
58-
q.put({"fn": my_funct, "args": (), "kwargs": {"a": 1, "b": 2}, "future": fs1, "resource_dict": {}})
58+
q.put(
59+
{
60+
"fn": my_funct,
61+
"args": (),
62+
"kwargs": {"a": 1, "b": 2},
63+
"future": fs1,
64+
"resource_dict": {},
65+
}
66+
)
5967
cache_dir = os.path.abspath("cache")
6068
os.makedirs(cache_dir, exist_ok=True)
6169
process = RaisingThread(
@@ -80,8 +88,24 @@ def test_executor_function_dependence_kwargs(self):
8088
fs1 = Future()
8189
fs2 = Future()
8290
q = Queue()
83-
q.put({"fn": my_funct, "args": (), "kwargs": {"a": 1, "b": 2}, "future": fs1, "resource_dict": {}})
84-
q.put({"fn": my_funct, "args": (), "kwargs": {"a": 1, "b": fs1}, "future": fs2, "resource_dict": {}})
91+
q.put(
92+
{
93+
"fn": my_funct,
94+
"args": (),
95+
"kwargs": {"a": 1, "b": 2},
96+
"future": fs1,
97+
"resource_dict": {},
98+
}
99+
)
100+
q.put(
101+
{
102+
"fn": my_funct,
103+
"args": (),
104+
"kwargs": {"a": 1, "b": fs1},
105+
"future": fs2,
106+
"resource_dict": {},
107+
}
108+
)
85109
cache_dir = os.path.abspath("cache")
86110
os.makedirs(cache_dir, exist_ok=True)
87111
process = RaisingThread(
@@ -106,8 +130,24 @@ def test_executor_function_dependence_args(self):
106130
fs1 = Future()
107131
fs2 = Future()
108132
q = Queue()
109-
q.put({"fn": my_funct, "args": (), "kwargs": {"a": 1, "b": 2}, "future": fs1, "resource_dict": {}})
110-
q.put({"fn": my_funct, "args": [fs1], "kwargs": {"b": 2}, "future": fs2, "resource_dict": {}})
133+
q.put(
134+
{
135+
"fn": my_funct,
136+
"args": (),
137+
"kwargs": {"a": 1, "b": 2},
138+
"future": fs1,
139+
"resource_dict": {},
140+
}
141+
)
142+
q.put(
143+
{
144+
"fn": my_funct,
145+
"args": [fs1],
146+
"kwargs": {"b": 2},
147+
"future": fs2,
148+
"resource_dict": {},
149+
}
150+
)
111151
cache_dir = os.path.abspath("cache")
112152
os.makedirs(cache_dir, exist_ok=True)
113153
process = RaisingThread(

0 commit comments

Comments
 (0)