Skip to content

Commit

Permalink
Merge pull request #769 from hugovk/master
Browse files Browse the repository at this point in the history
Add support for Python 3.12
  • Loading branch information
Red-M committed Sep 29, 2023
2 parents 300668b + 42cc1c1 commit c534976
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ master ]

env:
FORCE_COLOR: 1

jobs:
test:
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand All @@ -14,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-22.04"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-rc.1", "pypy3.9"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9"]
include:
# Python < 3.7 is not available on ubuntu-22.04
- os: "ubuntu-20.04"
Expand All @@ -23,12 +26,13 @@ jobs:
python-version: "3.6"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install packages
run: |
Expand All @@ -40,9 +44,10 @@ jobs:
run: |
./tools/display-sighandlers.py
./tools/display-terminalinfo.py
py.test --cov pexpect --cov-config .coveragerc
pytest --cov pexpect --cov-config .coveragerc
- name: Check coverage
if: github.repository_owner == 'pexpect'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -24,7 +24,7 @@ install:
script:
- ./tools/display-sighandlers.py
- ./tools/display-terminalinfo.py
- py.test --cov pexpect --cov-config .coveragerc
- pytest --cov pexpect --cov-config .coveragerc

after_success:
- coverage combine
Expand Down
4 changes: 2 additions & 2 deletions DEVELOPERS.rst
@@ -1,6 +1,6 @@
To run the tests, use `py.test <http://pytest.org/latest/>`_::
To run the tests, use `pytest <http://pytest.org/latest/>`_::

py.test tests
pytest tests

The tests are all located in the tests/ directory. To add a new unit
test all you have to do is create the file in the tests/ directory with a
Expand Down
4 changes: 2 additions & 2 deletions tests/README
@@ -1,8 +1,8 @@

The best way to run these tests is from the directory above this one. Run:

py.test
pytest

To run a specific test file:

py.test tests/test_constructor.py
pytest tests/test_constructor.py
4 changes: 2 additions & 2 deletions tools/teamcity-runtests.sh
Expand Up @@ -41,7 +41,7 @@ pip install --upgrade pytest-cov coverage coveralls pytest-capturelog
# run tests
cd $here/..
ret=0
py.test \
pytest \
--cov pexpect \
--cov-config .coveragerc \
--junit-xml=results.${osrel}.py${pyversion}.xml \
Expand All @@ -52,7 +52,7 @@ py.test \
if [ $ret -ne 0 ]; then
# we always exit 0, preferring instead the jUnit XML
# results to be the dominate cause of a failed build.
echo "py.test returned exit code ${ret}." >&2
echo "pytest returned exit code ${ret}." >&2
echo "the build should detect and report these failing tests." >&2
fi

Expand Down

0 comments on commit c534976

Please sign in to comment.