1
0
Fork 0
mirror of synced 2024-11-22 08:15: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: strategy:
fail-fast: false fail-fast: false
matrix: 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"] python: ["2.7", "pypy-2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.9"]
include: include:
- os: "windows-latest" - os: "windows-latest"
@ -21,12 +21,12 @@ jobs:
- os: "windows-latest" - os: "windows-latest"
python: "3.10" python: "3.10"
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
name: "Python ${{ matrix.python }} on ${{ matrix.os }}" name: "Test: Python ${{ matrix.python }} on ${{ matrix.os }}"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
submodules: recursive submodules: recursive
- uses: actions/setup-python@v3 - uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
- name: "Install dependencies" - name: "Install dependencies"
@ -36,3 +36,10 @@ jobs:
- name: "Run tests" - name: "Run tests"
run: | run: |
python -m tox 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: else:
cmd = item cmd = item
msg = None msg = None
if msg is None: if quiet:
self._log.lowinfo(cmd) if msg is not None:
elif quiet:
self._log.lowinfo("%s" % msg) self._log.lowinfo("%s" % msg)
elif msg is None:
self._log.lowinfo(cmd)
else: else:
self._log.lowinfo("%s [%s]" % (msg, cmd)) self._log.lowinfo("%s [%s]" % (msg, cmd))
stdout = options.get("stdout", stdout) 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): 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( dotfiles.write_config(
[ [
@ -258,4 +258,4 @@ def test_shell_quiet_enabled_without_description(capfd, dotfiles, run_dotbot):
stdout = capfd.readouterr().out.splitlines() stdout = capfd.readouterr().out.splitlines()
assert not any(line.startswith("banana") for line in stdout) 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__))) git_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.chdir(dotfiles.directory) os.chdir(dotfiles.directory)
subprocess.check_call([git, "init"]) 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) shutil.copy(install, shim)
dotfiles.write("foo", "pear") dotfiles.write("foo", "pear")
dotfiles.write_config([{"link": {"~/.foo": "foo"}}]) dotfiles.write_config([{"link": {"~/.foo": "foo"}}])