Skip to content

Instantly share code, notes, and snippets.

@jaraco
Created April 27, 2017 12:40
Show Gist options
  • Save jaraco/65211daf704bbbd9f872d673d151dbb6 to your computer and use it in GitHub Desktop.
Save jaraco/65211daf704bbbd9f872d673d151dbb6 to your computer and use it in GitHub Desktop.
$ cat > test-warnings.py
import warnings
def test_deprecated():
warnings.warn("deprecated", DeprecationWarning)
$ rwt git+https://github.com/pytest-dev/pytest -- -m pytest test-warnings.py
Collecting git+https://github.com/pytest-dev/pytest
Cloning https://github.com/pytest-dev/pytest to /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-mnbpyk5d-build
Collecting py>=1.4.29 (from pytest==3.0.8.dev0)
Using cached py-1.4.33-py2.py3-none-any.whl
Collecting setuptools (from pytest==3.0.8.dev0)
Using cached setuptools-35.0.1-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools->pytest==3.0.8.dev0)
Using cached packaging-16.8-py2.py3-none-any.whl
Collecting appdirs>=1.4.0 (from setuptools->pytest==3.0.8.dev0)
Using cached appdirs-1.4.3-py2.py3-none-any.whl
Collecting six>=1.6.0 (from setuptools->pytest==3.0.8.dev0)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools->pytest==3.0.8.dev0)
Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Installing collected packages: py, six, pyparsing, packaging, appdirs, setuptools, pytest
Running setup.py install for pytest ... done
Successfully installed appdirs-1.4.3 packaging-16.8 py-1.4.33 pyparsing-2.2.0 pytest-3.0.8.dev0 setuptools-35.0.1 six-1.10.0
====================================== test session starts =======================================
platform darwin -- Python 3.6.1, pytest-3.0.8.dev, py-1.4.33, pluggy-0.4.0
rootdir: /Users/jaraco, inifile:
collected 1 items
test-warnings.py .
==================================== 1 passed in 0.01 seconds ====================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment