From 013ad9df2c9475d8a94b9a4603b4174c3a0c0bde Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:31:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- server/autotest_server/testers/haskell/setup.py | 5 ++++- server/autotest_server/tests/test_autotest_server.py | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/autotest_server/testers/haskell/setup.py b/server/autotest_server/testers/haskell/setup.py index 5f049b62..43f8090c 100644 --- a/server/autotest_server/testers/haskell/setup.py +++ b/server/autotest_server/testers/haskell/setup.py @@ -19,7 +19,10 @@ def install(): resolver = "lts-16.17" cmd = ["stack", "build", "--resolver", resolver, "--system-ghc", *HASKELL_TEST_DEPS] subprocess.run(cmd, check=True) - subprocess.run(os.path.join(os.path.dirname(os.path.realpath(__file__)), "stack_permissions.sh"), check=True, shell=True) + subprocess.run( + os.path.join(os.path.dirname(os.path.realpath(__file__)), "stack_permissions.sh"), check=True, shell=True + ) + def settings(): with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "settings_schema.json")) as f: diff --git a/server/autotest_server/tests/test_autotest_server.py b/server/autotest_server/tests/test_autotest_server.py index 6629ffe0..e53a69b9 100644 --- a/server/autotest_server/tests/test_autotest_server.py +++ b/server/autotest_server/tests/test_autotest_server.py @@ -49,8 +49,9 @@ def test_sticky(): assert os.path.exists(path) is False + def test_stack_permissions(): - stack_root = os.environ['STACK_ROOT'] + stack_root = os.environ["STACK_ROOT"] path = f"{stack_root}/stack.sqlite3.pantry-write-lock" permissions = oct(os.stat(path).st_mode)[-3:] - assert permissions[1] == '6' \ No newline at end of file + assert permissions[1] == "6"