Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Added tests from trio's multierror test suite #19

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .appveyor.yml

This file was deleted.

25 changes: 3 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python
sudo: false
dist: trusty
dist: xenial

matrix:
include:
Expand All @@ -11,30 +10,12 @@ matrix:
env: CHECK_FORMATTING=1
# The pypy tests are slow, so list them early
- python: pypy3.5
# Uncomment if you want to test on pypy nightly:
# - language: generic
# env: USE_PYPY_NIGHTLY=1
- python: 3.5.0
- python: 3.5.2
- python: 3.6
# As of 2018-07-05, Travis's 3.7 and 3.8 builds only work if you
# use dist: xenial AND sudo: required
# See: https://github.com/python-trio/trio/pull/556#issuecomment-402879391
- python: 3.7
dist: xenial
sudo: required
- python: 3.8-dev
dist: xenial
sudo: required
- os: osx
language: generic
env: MACPYTHON=3.5.4
- os: osx
language: generic
env: MACPYTHON=3.6.6
- os: osx
language: generic
env: MACPYTHON=3.7.0
allow_failures:
- python: 3.8-dev

script:
- ci/travis.sh
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Python.

This project is currently maintained by the `Trio project
<https://trio.readthedocs.io>`__, but the goal is for some version of
it to be merged into Python 3.8, so it can be used in both Trio and
it to be merged into Python 3.9, so it can be used in both Trio and
asyncio. For more information, see:
https://github.com/python-trio/trio/issues/611

Expand Down
49 changes: 0 additions & 49 deletions ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,6 @@

set -ex

if [ "$TRAVIS_OS_NAME" = "osx" ]; then
curl -Lo macpython.pkg https://www.python.org/ftp/python/${MACPYTHON}/python-${MACPYTHON}-macosx10.6.pkg
sudo installer -pkg macpython.pkg -target /
ls /Library/Frameworks/Python.framework/Versions/*/bin/
PYTHON_EXE=/Library/Frameworks/Python.framework/Versions/*/bin/python3
# The pip in older MacPython releases doesn't support a new enough TLS
curl https://bootstrap.pypa.io/get-pip.py | sudo $PYTHON_EXE
sudo $PYTHON_EXE -m pip install virtualenv
$PYTHON_EXE -m virtualenv testenv
source testenv/bin/activate
fi

if [ "$USE_PYPY_NIGHTLY" = "1" ]; then
curl -fLo pypy.tar.bz2 http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-latest-linux64.tar.bz2
if [ ! -s pypy.tar.bz2 ]; then
# We know:
# - curl succeeded (200 response code; -f means "exit with error if
# server returns 4xx or 5xx")
# - nonetheless, pypy.tar.bz2 does not exist, or contains no data
# This isn't going to work, and the failure is not informative of
# anything involving this package.
ls -l
echo "PyPy3 nightly build failed to download – something is wrong on their end."
echo "Skipping testing against the nightly build for right now."
exit 0
fi
tar xaf pypy.tar.bz2
# something like "pypy-c-jit-89963-748aa3022295-linux64"
PYPY_DIR=$(echo pypy-c-jit-*)
PYTHON_EXE=$PYPY_DIR/bin/pypy3
($PYTHON_EXE -m ensurepip \
&& $PYTHON_EXE -m pip install virtualenv \
&& $PYTHON_EXE -m virtualenv testenv) \
|| (echo "pypy nightly is broken; skipping tests"; exit 0)
source testenv/bin/activate
fi

if [ "$USE_PYPY_RELEASE_VERSION" != "" ]; then
curl -fLo pypy.tar.bz2 https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.5-${USE_PYPY_RELEASE_VERSION}-linux_x86_64-portable.tar.bz2
tar xaf pypy.tar.bz2
# something like "pypy3.5-5.7.1-beta-linux_x86_64-portable"
PYPY_DIR=$(echo pypy3.5-*)
PYTHON_EXE=$PYPY_DIR/bin/pypy3
$PYTHON_EXE -m ensurepip
$PYTHON_EXE -m pip install virtualenv
$PYTHON_EXE -m virtualenv testenv
source testenv/bin/activate
fi

pip install -U pip setuptools wheel

if [ "$CHECK_FORMATTING" = "1" ]; then
Expand Down
84 changes: 0 additions & 84 deletions exceptiongroup/_tests/test_exceptiongroup.py

This file was deleted.

20 changes: 20 additions & 0 deletions exceptiongroup/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pytest


def pytest_addoption(parser):
parser.addoption("--run-slow", action="store_true", help="run slow tests")


def pytest_configure(config):
config.addinivalue_line("markers", "slow: mark a time consuming test")


def pytest_collection_modifyitems(config, items):
if config.getoption("--run-slow", True):
# --runslow given in cli: do not skip slow tests
return

skip_slow = pytest.mark.skip(reason="need --run-slow option to run")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)
Loading