From 437e736c7dd42c36150d2bee3c9db89cc36c2099 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:25:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- base-notebook/test/test_container_options.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/base-notebook/test/test_container_options.py b/base-notebook/test/test_container_options.py index c07364ec..5c5e47a4 100644 --- a/base-notebook/test/test_container_options.py +++ b/base-notebook/test/test_container_options.py @@ -188,15 +188,16 @@ def test_group_add(container, tmpdir): logs = c.logs(stdout=True).decode("utf-8") assert "uid=1010 gid=1010 groups=1010,100(users)" in logs + def test_container_not_delete_bind_mount(container, tmp_path): - """Container should not delete host system files when using the (docker) + """Container should not delete host system files when using the (docker) -v bind mount flag and mapping to /home/jovyan. """ d = tmp_path / "data" d.mkdir() p = d / "foo.txt" p.write_text("some-content") - + c = container.run( tty=True, user="root", @@ -205,11 +206,11 @@ def test_container_not_delete_bind_mount(container, tmp_path): "NB_USER=user", "CHOWN_HOME=yes", ], - volumes={ d : {'bind': '/home/jovyan/data', 'mode': 'rw'}}, - command=["start.sh", "jupyter", "lab"] + volumes={d: {"bind": "/home/jovyan/data", "mode": "rw"}}, + command=["start.sh", "jupyter", "lab"], ) time.sleep(10) - + assert p.read_text() == "some-content" assert len(list(tmp_path.iterdir())) == 1