From 56d0d16ee57aa067a5909ffce3a64fb7cbd289e9 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Wed, 18 Jan 2023 17:53:08 +0100 Subject: [PATCH 1/2] add regression test --- neurodocker/cli/tests/test_cli.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/neurodocker/cli/tests/test_cli.py b/neurodocker/cli/tests/test_cli.py index 1b108779..5a2d3c69 100644 --- a/neurodocker/cli/tests/test_cli.py +++ b/neurodocker/cli/tests/test_cli.py @@ -42,6 +42,25 @@ def test_minimal_args(cmd: str, pkg_manager: str): assert result.exit_code == 0, result.output +def test_copy(): + runner = CliRunner() + result = runner.invoke( + generate, + [ + "docker", + "--pkg-manager", + "apt", + "--base-image", + "debian", + # copy + "--copy", + "file1", + "file2", + ], + ) + assert "file1" in (result.output) + + @pytest.mark.parametrize("cmd", _cmds) @pytest.mark.parametrize("pkg_manager", ["apt", "yum"]) def test_all_args(cmd: str, pkg_manager: str): From 706af0b2a4b6b40ddcdc531ab7b1d436c5449940 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Wed, 18 Jan 2023 17:55:26 +0100 Subject: [PATCH 2/2] add expected failure --- neurodocker/cli/tests/test_cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/neurodocker/cli/tests/test_cli.py b/neurodocker/cli/tests/test_cli.py index 5a2d3c69..1f4b860a 100644 --- a/neurodocker/cli/tests/test_cli.py +++ b/neurodocker/cli/tests/test_cli.py @@ -42,6 +42,7 @@ def test_minimal_args(cmd: str, pkg_manager: str): assert result.exit_code == 0, result.output +@pytest.mark.xfail(reason="https://github.com/ReproNim/neurodocker/issues/498") def test_copy(): runner = CliRunner() result = runner.invoke(