Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 28, 2024
1 parent 9a98132 commit 69f2244
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/test_cache_executor_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def mpi_funct(i):
)
class TestCacheExecutorMPI(unittest.TestCase):
def test_executor(self):
with FileExecutor(resource_dict={"cores": 2}, execute_function=execute_in_subprocess) as exe:
with FileExecutor(
resource_dict={"cores": 2}, execute_function=execute_in_subprocess
) as exe:
fs1 = exe.submit(mpi_funct, 1)
self.assertFalse(fs1.done())
self.assertEqual(fs1.result(), [(1, 2, 0), (1, 2, 1)])
Expand Down
4 changes: 3 additions & 1 deletion tests/test_cache_executor_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def test_executor_dependence_mixed(self):

def test_executor_working_directory(self):
cwd = os.path.join(os.path.dirname(__file__), "executables")
with FileExecutor(resource_dict={"cwd": cwd}, execute_function=execute_in_subprocess) as exe:
with FileExecutor(
resource_dict={"cwd": cwd}, execute_function=execute_in_subprocess
) as exe:
fs1 = exe.submit(list_files_in_working_directory)
self.assertEqual(fs1.result(), os.listdir(cwd))

Expand Down

0 comments on commit 69f2244

Please sign in to comment.