From e53de785ac06897a0465a5958d683515146062bc Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Tue, 14 Feb 2023 11:18:40 +0100 Subject: [PATCH 1/3] tests: Add `test_git_stash_workspace_reinstate_index` --- tests/test_stash.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_stash.py b/tests/test_stash.py index 10b95f27..b749f4e3 100644 --- a/tests/test_stash.py +++ b/tests/test_stash.py @@ -19,6 +19,23 @@ def test_git_stash_workspace(tmp_dir: TmpDir, scm: Git): assert (tmp_dir / "file").read_text() == "1" +def test_git_stash_workspace_reinstate_index(tmp_dir: TmpDir, scm: Git): + tmp_dir.gen({"modified": "init", "deleted": "deleted"}) + scm.add_commit(["modified", "deleted"], "init") + + tmp_dir.gen({"newfile": "nefile"}) + scm.add("newfile") + tmp_dir.gen({"modified": "modified"}) + scm.add("modified") + (tmp_dir / "deleted").unlink() + scm.add("deleted") + + prev_status = scm.status() + with scm.stash_workspace(reinstate_index=True): + pass + assert scm.status() == prev_status + + @pytest.mark.parametrize( "ref, include_untracked", [ From f902966e0d8ef5b599f2beb860e0db4dce9d4604 Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Tue, 14 Feb 2023 11:37:38 +0100 Subject: [PATCH 2/3] Update tests.yaml --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c45d15ed..7efd436b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -44,7 +44,7 @@ jobs: - name: Lint code and check dependencies continue-on-error: ${{ matrix.nox_pyv == '3.11' }} - run: nox -s lint safety + run: nox -s lint safety --verbose - name: Run tests run: nox -s tests-${{ matrix.nox_pyv || matrix.pyv }} -- --slow --cov-report=xml From 7aa049727474f12af597315558f161c3fd6910b0 Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Tue, 14 Feb 2023 11:53:56 +0100 Subject: [PATCH 3/3] Update docker-compose.yml --- tests/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 1137811a..bbbc8eec 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.2' services: git-server: - image: ghcr.io/linuxserver/openssh-server + image: ghcr.io/linuxserver/openssh-server:9.0_p1-r2-ls100 environment: - USER_NAME=user - PUBLIC_KEY_FILE=/tmp/key