summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2020-12-11 18:24:53 -0300
committerGitHub <noreply@github.com>2020-12-11 18:24:53 -0300
commit2de53a67589d8eeaea35927357c0a05dd0329ce4 (patch)
treec3dd12691bb13dde5457a08a77e69edda42906bc
parentfa1b32e2912ad4ea39016cd50ec3125d204bcf65 (diff)
parent887d6b8937bd74c729c89b589ec8adaa557a78cf (diff)
downloadpy-2de53a67589d8eeaea35927357c0a05dd0329ce4.tar.gz
Merge pull request #266 from nicoddemus/gh-actions
-rw-r--r--.appveyor.yml29
-rw-r--r--.github/workflows/main.yml12
-rw-r--r--.travis.yml68
-rw-r--r--README.rst7
-rw-r--r--testing/code/test_source.py18
-rw-r--r--testing/path/test_local.py3
6 files changed, 22 insertions, 115 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100644
index ecb64593..00000000
--- a/.appveyor.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-environment:
- matrix:
- # note: please use "tox --listenvs" to populate the build matrix below
- - TOXENV: "py27-pytest29"
- - TOXENV: "py27-pytest30"
- - TOXENV: "py27-pytest31"
- - TOXENV: "py35-pytest29"
- - TOXENV: "py35-pytest30"
- - TOXENV: "py35-pytest31"
- - TOXENV: "py36-pytest29"
- - TOXENV: "py36-pytest30"
- - TOXENV: "py36-pytest31"
- - TOXENV: "py37-pytest30"
- - TOXENV: "py37-pytest31"
-
-install:
- - echo Installed Pythons
- - dir c:\Python*
-
- - C:\Python37\python -m pip install --upgrade --pre tox
-
-build: false # Not a C# project, build stuff at the test step instead.
-
-test_script:
- - C:\Python37\python -m tox
-
-# We don't deploy anything on tags with AppVeyor, we use Travis instead, so we
-# might as well save resources
-skip_tags: true
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c3d3864e..0192a42a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,17 +14,17 @@ jobs:
os: [ubuntu-latest, windows-latest]
include:
- python: "2.7"
- tox_env: "py27-pytest31"
+ tox_env: "py27-pytest30"
- python: "3.5"
- tox_env: "py35-pytest31"
+ tox_env: "py35-pytest30"
- python: "3.6"
- tox_env: "py36-pytest31"
+ tox_env: "py36-pytest30"
- python: "3.7"
- tox_env: "py37-pytest31"
+ tox_env: "py37-pytest30"
- python: "3.8"
- tox_env: "py38-pytest31"
+ tox_env: "py38-pytest30"
- python: "pypy3"
- tox_env: "pypy3-pytest31"
+ tox_env: "pypy3-pytest30"
steps:
- uses: actions/checkout@v1
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 25fb8ca3..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-dist: xenial
-language: python
-
-python:
- - '2.7'
- - '3.5'
- - '3.6'
- - '3.7'
- # - 'pypy'
- - 'pypy3'
-
-env:
- global:
- - COVERAGE_PROCESS_START=$PWD/tox.ini
- matrix:
- - DEPS="pytest~=2.9.0"
- - DEPS="pytest~=3.0.0"
- #- DEPS="pytest~=3.1.0"
-
-stages:
- - name: test
- if: tag IS NOT present
- - name: deploy
- if: repo = pytest-dev/py AND tag IS present
-
-matrix:
- include:
- - python: '2.7'
- # using a different option due to pytest-addopts pytester issues
- env: PYTEST_XADDOPTS="-n auto --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist<1.25 pytest-forked<0.3"
-
- - stage: deploy
- python: '3.6'
- env:
- install: pip install -U setuptools setuptools_scm
- script: skip
- deploy:
- provider: pypi
- user: nicoddemus
- distributions: sdist bdist_wheel
- skip_upload_docs: true
- password:
- secure: VNYW/sZoD+9DzKCe6vANNXXJR7jP7rwySafQ33N1jAnCrdylQjEN/p6tSfUe8jDi3wDpLPL9h8pwfxuUT7CRxglHov3Qe7zSeywixvHan5aFahQiQ8+gucYIM7wITHH3oQs7jN35pnhdnF+QlW2+eDCL6qOLU5XwuRhsDKXjQ/hUWR5hlX5EniD1gzyKEf6j1YCpST87tKpeLwVEYEmsucdkUZuXhxDtyaWQHWiPsLWwh/slQtUJEHeLF26r8UxFy0RiGne9jR+CzRfH5ktcA9/pArvp4VuwOii+1TDxVSYP7+I8Z+eUKN9JBg12QLaHwoIN/8J+MvHCkuf+OGSLM3sEyNRJGDev372xg3K7ylIkeeK4WXirKEp2ojgN8tniloDjnwdu/gPWBnrXuooA60tNoByHFa8KbMZAr2B2sQeMxD4VZGr1N8l0rX4gRTrwvdk3i3ulLKVSwkXaGn+GrfZTTboa7dEnpuma8tv1niNCSpStYIy7atS8129+5ijV3OC8DzOMh/rVbO9WsDb/RPG3yjFiDvEJPIPeE0l/m5u42QBqtdZSS2ia7UWTJBiEY09uFMTRmH5hhE/1aiYBbvAztf5CReUbeKdSQz3L8TTSZqewtFZmXTkX97/xQnrEpsnGezIM2DNuMEuQG3MxGkNCxwbQKpx/bkHdrD75yMk=
- on:
- tags: true
- repo: pytest-dev/py
-
- exclude:
- - python: '3.7'
- env: DEPS="pytest~=2.9.0"
-
- allow_failures:
- - python: 'pypy'
- - python: 'pypy3'
-
-install:
- - pip install -U coverage coverage-enable-subprocess pip setuptools setuptools_scm
- - pip install $DEPS
- - pip install -U . --force-reinstall
-
-script:
- - coverage run -m pytest --lsof $PYTEST_XADDOPTS
-
-after_success:
- - coverage combine
- - coverage report -m
- - coverage xml
- - bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -e TRAVIS_PYTHON_VERSION
diff --git a/README.rst b/README.rst
index 8456b235..80800b2b 100644
--- a/README.rst
+++ b/README.rst
@@ -7,11 +7,8 @@
.. image:: https://img.shields.io/pypi/pyversions/py.svg
:target: https://pypi.org/project/py
-.. image:: https://img.shields.io/travis/pytest-dev/py.svg
- :target: https://travis-ci.org/pytest-dev/py
-
-.. image:: https://ci.appveyor.com/api/projects/status/10keglan6uqwj5al/branch/master?svg=true
- :target: https://ci.appveyor.com/project/pytestbot/py
+.. image:: https://github.com/pytest-dev/py/workflows/build/badge.svg
+ :target: https://github.com/pytest-dev/py/actions
**NOTE**: this library is in **maintenance mode** and should not be used in new code.
diff --git a/testing/code/test_source.py b/testing/code/test_source.py
index 3492761a..08fc733c 100644
--- a/testing/code/test_source.py
+++ b/testing/code/test_source.py
@@ -103,7 +103,7 @@ def test_source_strip_multiline():
def test_syntaxerror_rerepresentation():
ex = py.test.raises(SyntaxError, py.code.compile, 'xyz xyz')
assert ex.value.lineno == 1
- assert ex.value.offset in (4,7) # XXX pypy/jython versus cpython?
+ assert ex.value.offset in (5, 7) # pypy/cpython difference
assert ex.value.text.strip(), 'x x'
def test_isparseable():
@@ -510,11 +510,17 @@ def test_comments():
comment 4
"""
'''
- for line in range(2,6):
- assert str(getstatement(line, source)) == ' x = 1'
- for line in range(6,10):
- assert str(getstatement(line, source)) == ' assert False'
- assert str(getstatement(10, source)) == '"""'
+ for line in range(2, 6):
+ assert str(getstatement(line, source)) == " x = 1"
+ if sys.version_info >= (3, 8) or hasattr(sys, "pypy_version_info"):
+ tqs_start = 8
+ else:
+ tqs_start = 10
+ assert str(getstatement(10, source)) == '"""'
+ for line in range(6, tqs_start):
+ assert str(getstatement(line, source)) == " assert False"
+ for line in range(tqs_start, 10):
+ assert str(getstatement(line, source)) == '"""\ncomment 4\n"""'
def test_comment_in_statement():
source = '''test(foo=1,
diff --git a/testing/path/test_local.py b/testing/path/test_local.py
index a6b8f476..1b9a7923 100644
--- a/testing/path/test_local.py
+++ b/testing/path/test_local.py
@@ -721,8 +721,9 @@ def test_samefile_symlink(tmpdir):
p2 = tmpdir.join("linked.txt")
try:
os.symlink(str(p1), str(p2))
- except OSError as e:
+ except (OSError, NotImplementedError) as e:
# on Windows this might fail if the user doesn't have special symlink permissions
+ # pypy3 on Windows doesn't implement os.symlink and raises NotImplementedError
pytest.skip(str(e.args[0]))
assert p1.samefile(p2)