Skip to content

Commit

Permalink
doctest fix
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki committed Apr 28, 2023
1 parent c759817 commit bde1615
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ jobs:
name: ${{ matrix.os[0] }}-${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config[0] }}

- name: Pip cache
uses: actions/cache@v3
with:
Expand All @@ -39,9 +41,21 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
run: |
python -c "import sys; print(sys.platform)"
tox -e ${{ matrix.config[1] }}
- name: Save Buildout
uses: actions/upload-artifact@v3
# safe artifacts only for failing tests
if: ${{ failure() }}
with:
name: generated-buildout-${{ matrix.os[0] }}-${{ matrix.config[0] }}
path: sample-buildout
5 changes: 3 additions & 2 deletions src/plone/recipe/zeoserver/tests/zeoserver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ We should have a zeo.conf with log file rotation enabled::

>>> zeo = os.path.join(sample_buildout, 'parts', 'zeo')
>>> with open(os.path.join(zeo, 'etc', 'zeo.conf')) as f:
... print(f.read())
... output = f.read()
>>> print(output.replace('\\', '/'))
%define INSTANCE ...
...
<eventlog>
Expand Down Expand Up @@ -474,7 +475,7 @@ be different and correspond as the buildout specified::
>>> zeopack_scripts = ('first-zeopack', 'second-zeopack')
>>> zeopack_paths = [os.path.join(sample_buildout, 'bin', script) for script in zeopack_scripts]
>>> if WINDOWS:
... zeopack_paths = [zeopack + '-script.py' for zeopack in zeopacks]
... zeopack_paths = [zeopack + '-script.py' for zeopack in zeopack_scripts]
>>> with open(zeopack_paths[0], 'r') as f:
... first_zeopack = f.read()
>>> with open(zeopack_paths[1], 'r') as f:
Expand Down

0 comments on commit bde1615

Please sign in to comment.