1
0
Fork 0
mirror of synced 2024-11-22 00:05:34 -05:00

Resolve merge conflicts

Note that this does NOT port the following command over:

```shell
git config --global protocol.file.allow always
```

Doing so would change the git configuration of users running
the unit tests locally, and this is not an acceptable outcome.
Instead, the git configuration is modified at the CLI using
the `-c protocol.file.allow=always` argument to accomplish
the same thing without side effects.
This commit is contained in:
Kurt McKee 2022-12-16 13:52:33 -06:00
commit e0c78d9c56
No known key found for this signature in database
GPG key ID: 64713C0B5BA8E1C2
4 changed files with 19 additions and 9 deletions

View file

@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-20.04", "macos-latest"]
python: ["2.7", "pypy-2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.9"]
include:
- os: "windows-latest"
@ -21,12 +21,12 @@ jobs:
- os: "windows-latest"
python: "3.10"
runs-on: ${{ matrix.os }}
name: "Python ${{ matrix.python }} on ${{ matrix.os }}"
name: "Test: Python ${{ matrix.python }} on ${{ matrix.os }}"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: "Install dependencies"
@ -36,3 +36,10 @@ jobs:
- name: "Run tests"
run: |
python -m tox
fmt:
name: Format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable

View file

@ -40,10 +40,11 @@ class Shell(Plugin):
else:
cmd = item
msg = None
if msg is None:
if quiet:
if msg is not None:
self._log.lowinfo("%s" % msg)
elif msg is None:
self._log.lowinfo(cmd)
elif quiet:
self._log.lowinfo("%s" % msg)
else:
self._log.lowinfo("%s [%s]" % (msg, cmd))
stdout = options.get("stdout", stdout)

View file

@ -240,7 +240,7 @@ def test_shell_quiet_enabled_with_description(capfd, dotfiles, run_dotbot):
def test_shell_quiet_enabled_without_description(capfd, dotfiles, run_dotbot):
"""Verify the command is shown when quiet is enabled with no description."""
"""Verify nothing is shown when quiet is enabled with no description."""
dotfiles.write_config(
[
@ -258,4 +258,4 @@ def test_shell_quiet_enabled_without_description(capfd, dotfiles, run_dotbot):
stdout = capfd.readouterr().out.splitlines()
assert not any(line.startswith("banana") for line in stdout)
assert any(line.startswith("echo banana") for line in stdout)
assert not any(line.startswith("echo banana") for line in stdout)

View file

@ -42,7 +42,9 @@ def test_shim(root, home, dotfiles, run_dotbot):
git_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.chdir(dotfiles.directory)
subprocess.check_call([git, "init"])
subprocess.check_call([git, "submodule", "add", git_directory, "dotbot"])
subprocess.check_call(
[git, "-c", "protocol.file.allow=always", "submodule", "add", git_directory, "dotbot"]
)
shutil.copy(install, shim)
dotfiles.write("foo", "pear")
dotfiles.write_config([{"link": {"~/.foo": "foo"}}])