Hello community,
here is the log from the commit of package python-pygments-pytest for
openSUSE:Factory checked in at 2020-04-19 21:43:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pygments-pytest (Old)
and /work/SRC/openSUSE:Factory/.python-pygments-pytest.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pygments-pytest"
Sun Apr 19 21:43:34 2020 rev:5 rq:787375 version:2.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pygments-pytest/python-pygments-pytest.changes
2020-01-16 18:16:41.564820452 +0100
+++
/work/SRC/openSUSE:Factory/.python-pygments-pytest.new.2738/python-pygments-pytest.changes
2020-04-19 21:44:14.203450795 +0200
@@ -1,0 +2,7 @@
+Mon Mar 16 08:45:47 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 2.0.0:
+ * Fixes for new pytests
+ * Drop support for python2
+
+-------------------------------------------------------------------
Old:
----
v1.3.1.tar.gz
New:
----
v2.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pygments-pytest.spec ++++++
--- /var/tmp/diff_new_pack.1lPYWK/_old 2020-04-19 21:44:30.127482745 +0200
+++ /var/tmp/diff_new_pack.1lPYWK/_new 2020-04-19 21:44:30.127482745 +0200
@@ -17,22 +17,22 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
Name: python-pygments-pytest
-Version: 1.3.1
+Version: 2.0.0
Release: 0
Summary: A pygments lexer for pytest output
License: MIT
URL: https://github.com/asottile/pygments-pytest
Source:
https://github.com/asottile/pygments-pytest/archive/v%{version}.tar.gz
-BuildRequires: %{python_module py > 1.7.1}
BuildRequires: %{python_module pygments-ansi-color >= 0.0.3}
BuildRequires: %{python_module pygments}
-BuildRequires: %{python_module pytest >= 4.0}
+BuildRequires: %{python_module pytest >= 4.0.1}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pygments
-Requires: python-pytest
+Requires: python-pytest >= 4.0.1
BuildArch: noarch
%python_subpackages
@@ -50,8 +50,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-# Starting with pytest 5.3 the coloring changed slightly and all the assets
explode
-#%%pytest
+%pytest
%files %{python_files}
%doc README.md
++++++ v1.3.1.tar.gz -> v2.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/.github/workflows/deploy.yml
new/pygments-pytest-2.0.0/.github/workflows/deploy.yml
--- old/pygments-pytest-1.3.1/.github/workflows/deploy.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pygments-pytest-2.0.0/.github/workflows/deploy.yml 2020-02-28
00:45:38.000000000 +0100
@@ -0,0 +1,17 @@
+name: deploy
+on:
+ pull_request:
+ push:
+ branches: [master]
+
+jobs:
+ build:
+ name: pr
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-python@v1
+ - run: pip install tox
+ - run: tox -e push
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/.gitignore
new/pygments-pytest-2.0.0/.gitignore
--- old/pygments-pytest-1.3.1/.gitignore 2019-10-21 20:30:33.000000000
+0200
+++ new/pygments-pytest-2.0.0/.gitignore 2020-02-28 00:45:38.000000000
+0100
@@ -1,8 +1,8 @@
*.egg-info
*.pyc
-/demo/*.html
/.coverage
-/.pytest_cache
+/.mypy_cache
/.tox
+/demo/*.html
/index.html
/venv*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/.pre-commit-config.yaml
new/pygments-pytest-2.0.0/.pre-commit-config.yaml
--- old/pygments-pytest-1.3.1/.pre-commit-config.yaml 2019-10-21
20:30:33.000000000 +0200
+++ new/pygments-pytest-2.0.0/.pre-commit-config.yaml 2020-02-28
00:45:38.000000000 +0100
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v2.1.0
+ rev: v2.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
@@ -10,18 +10,34 @@
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://gitlab.com/pycqa/flake8
- rev: 3.7.1
+ rev: 3.7.9
hooks:
- id: flake8
+ additional_dependencies: [flake8-typing-imports==1.7.0]
- repo: https://github.com/pre-commit/mirrors-autopep8
- rev: v1.4.3
+ rev: v1.5
hooks:
- id: autopep8
- repo: https://github.com/asottile/reorder_python_imports
- rev: v1.3.5
+ rev: v2.0.0
hooks:
- id: reorder-python-imports
+ args: [--py3-plus]
- repo: https://github.com/asottile/pyupgrade
- rev: v1.11.1
+ rev: v2.1.0
hooks:
- id: pyupgrade
+ args: [--py36-plus]
+- repo: https://github.com/asottile/add-trailing-comma
+ rev: v2.0.0
+ hooks:
+ - id: add-trailing-comma
+ args: [--py36-plus]
+- repo: https://github.com/asottile/setup-cfg-fmt
+ rev: v1.7.0
+ hooks:
+ - id: setup-cfg-fmt
+- repo: https://github.com/pre-commit/mirrors-mypy
+ rev: v0.761
+ hooks:
+ - id: mypy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/.travis.yml
new/pygments-pytest-2.0.0/.travis.yml
--- old/pygments-pytest-1.3.1/.travis.yml 2019-10-21 20:30:33.000000000
+0200
+++ new/pygments-pytest-2.0.0/.travis.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,25 +0,0 @@
-language: python
-matrix:
- include:
- - env: TOXENV=py27
- - env: TOXENV=py35
- python: 3.5
- - env: TOXENV=py36
- python: 3.6
- - env: TOXENV=pypy
- python: pypy
- - env: TOXENV=py36-pytest-master
- python: 3.6
- - env: TOXENV=py36-pytest-features
- python: 3.6
- - env:
- - TOXENV=push
- - secure:
"AEAcy7+XgLUgpW7T8Qccmf39su1PVVoZEov+v9e1cPXdUEvZK2C96AdrHFIsc4J5x8kfU7doUM6sxxaLxVPNR0nyxbTckRq3r70YNlCn43VzyCHzAHQ4pZI/Pr+ys6jlAjXQjCfWrm1ttS0X7zyuBSJwRn7mnKkzKt19QHa8AoXD2hx78AjvVkHlLKm/TKBPCcPbAyTZjfaMsaSBmgyjv8l6q+Hw2E6j20M2FsjGIVtucV1zGUwYjZQSCQjzdzZUCjPYfFuUfV+0/UFCUe1dGvsA/hc3G9ZBN4CYfPNQzwB0wqaTyaR9aQVyDj2QRpYu2Nl0O4SPjmh5xOBJGQc6OjjqrlRrL7BVF+ZvfdwUe1Tf8fj3iC2tNIb1qywZuFVF5xmVsVo23Cm2gvnZdaCk48PAGXi555icBDjpzfypO/0PUANyx26rmbJ/Dadc/802aoCAx8L/BapO7efidT+TYtpW9WEa5VqnNiLMth7oJAacTGNvdoOxXLZV91gS2mofcPNC2x5BWu5/SM3mxoo8MVzF0PEXarLRaE6M8aHRAEawJfMwtyOCypDD018AjTYw+ca7eSV/f7yU8SQuRQxfEanVN1LN9DeBJ0L28DQxC7+lwosdbxQd3SxgPjWbGS2LobCTZ9+gJAWr8ohTK8uXZl3amY6Ve04sGuC0R3vWnQk="
- python: 3.6
-install: pip install coveralls tox
-script: tox
-after_success: coveralls
-cache:
- directories:
- - $HOME/.cache/pip
- - $HOME/.cache/pre-commit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/README.md
new/pygments-pytest-2.0.0/README.md
--- old/pygments-pytest-1.3.1/README.md 2019-10-21 20:30:33.000000000 +0200
+++ new/pygments-pytest-2.0.0/README.md 2020-02-28 00:45:38.000000000 +0100
@@ -1,5 +1,6 @@
-[](https://travis-ci.org/asottile/pygments-pytest)
-[](https://coveralls.io/github/asottile/pygments-pytest?branch=master)
+[](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=47&branchName=master)
+[](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=47&branchName=master)
+[](https://github.com/asottile/pygments-pytest/actions)
pygments-pytest
===============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/azure-pipelines.yml
new/pygments-pytest-2.0.0/azure-pipelines.yml
--- old/pygments-pytest-1.3.1/azure-pipelines.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pygments-pytest-2.0.0/azure-pipelines.yml 2020-02-28
00:45:38.000000000 +0100
@@ -0,0 +1,20 @@
+trigger:
+ branches:
+ include: [master, test-me-*]
+ tags:
+ include: ['*']
+
+resources:
+ repositories:
+ - repository: asottile
+ type: github
+ endpoint: github
+ name: asottile/azure-pipeline-templates
+ ref: refs/tags/v1.0.1
+
+jobs:
+- template: job--pre-commit.yml@asottile
+- template: job--python-tox.yml@asottile
+ parameters:
+ toxenvs: [pypy3, py36, py37, py38]
+ os: linux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/pygments_pytest.py
new/pygments-pytest-2.0.0/pygments_pytest.py
--- old/pygments-pytest-1.3.1/pygments_pytest.py 2019-10-21
20:30:33.000000000 +0200
+++ new/pygments-pytest-2.0.0/pygments_pytest.py 2020-02-28
00:45:38.000000000 +0100
@@ -1,11 +1,24 @@
import os.path
import re
+from typing import Any
+from typing import Dict
+from typing import Generator
+from typing import Match
+from typing import Optional
+from typing import Tuple
import pygments.lexer
import pygments.token
+Tok = Tuple[int, Any, str]
+
Color = pygments.token.Token.Color
STATUSES = ('failed', 'passed', 'skipped', 'deselected', 'no tests ran')
+BOLDIFY = {
+ Color.Red: Color.Bold.Red,
+ Color.Green: Color.Bold.Green,
+ Color.Yellow: Color.Bold.Yellow,
+}
class PytestLexer(pygments.lexer.RegexLexer):
@@ -13,9 +26,45 @@
aliases = ('pytest',)
flags = re.MULTILINE
- def filename_line(self, match):
- yield match.start(1), Color.Bold.Red, match.group(1)
- yield match.start(2), pygments.token.Text, match.group(2)
+ def filename_line(self, match: Match[str]) -> Generator[Tok, None, None]:
+ yield match.start(1), Color.Bold.Red, match[1]
+ yield match.start(2), pygments.token.Text, match[2]
+
+ def status_line(self, match: Match[str]) -> Generator[Tok, None, None]:
+ if match['failed'] or match['errors']:
+ start_end_color = Color.Red
+ elif (
+ match['skipped'] or
+ match['xfailed'] or
+ match['xpassed'] or
+ match['warnings']
+ ):
+ start_end_color = Color.Yellow
+ else:
+ start_end_color = Color.Green
+
+ if match['before']:
+ yield match.start('before'), start_end_color, match['before']
+ for k, color in (
+ ('failed', Color.Red),
+ ('passed', Color.Green),
+ ('skipped', Color.Yellow),
+ ('deselected', Color.Yellow),
+ ('xfailed', Color.Yellow),
+ ('xpassed', Color.Yellow),
+ ('warnings', Color.Yellow),
+ ('errors', Color.Red),
+ ):
+ if color == start_end_color:
+ color = BOLDIFY[color]
+ kcomma = f'{k}comma'
+ if match[k]:
+ yield match.start(k), color, match[k]
+ if match[kcomma]:
+ yield match.start(kcomma), pygments.token.Text, match[kcomma]
+ yield match.start('time'), start_end_color, match['time']
+ if match['after']:
+ yield match.start('after'), start_end_color, match['after']
tokens = {
'root': [
@@ -24,24 +73,28 @@
(r'^(?=.+\[ *\d+%\]$)', pygments.token.Text, 'progress_line'),
(r'^=+ (ERRORS|FAILURES) =+$', pygments.token.Text, 'failures'),
(r'^=+ warnings summary( \(final\))? =+$', Color.Yellow),
- (r'^(=+ )?[1-9]\d* (failed|error).*(=+)?$', Color.Bold.Red),
- (r'^(=+ )?[1-9].*[1-9]\d* warnings.*(=+)?$', Color.Bold.Yellow),
- (r'^(=+ )?[1-9]\d* passed.*(=+)?$', Color.Bold.Green),
(
- r'^(=+ )?[1-9]\d* (deselected|skipped).*(=+)?$',
- Color.Bold.Yellow,
+ r'^(?P<before>=+ )?'
+ r'(?P<failed>\d+ failed)?(?P<failedcomma>, )?'
+ r'(?P<passed>\d+ passed)?(?P<passedcomma>, )?'
+ r'(?P<skipped>\d+ skipped)?(?P<skippedcomma>, )?'
+ r'(?P<deselected>\d+ deselected)?(?P<deselectedcomma>, )?'
+ r'(?P<xfailed>\d+ xfailed)?(?P<xfailedcomma>, )?'
+ r'(?P<xpassed>\d+ xpassed)?(?P<xpassedcomma>, )?'
+ r'(?P<warnings>\d+ warnings?)?(?P<warningscomma>, )?'
+ r'(?P<errors>\d+ errors?)?(?P<errorscomma>)?'
+ r'(?P<time> in [\d.]+s)'
+ r'(?P<after> =+)?$',
+ status_line,
),
- (r'^(=+ )?[1-9]\d* (xfailed|xpassed).*(=+)?$', Color.Bold.Yellow),
- (r'^(=+ )?no tests ran.*(=+)?$', Color.Bold.Yellow),
+ (r'^(=+ )?no tests ran.*(=+)?$', Color.Yellow),
(r'.', pygments.token.Text), # prevent error tokens
],
'progress_line': [
(r'^[^ ]+ (?=[^ \n]+ +\[)', pygments.token.Text),
(r'PASSED|\.', Color.Green),
- (r'SKIPPED|XPASS|XFAIL|xfail|s|X|x', Color.Yellow),
- (r'ERROR|FAILED|E|F', Color.Red),
- (r'\[ *\d+%\]', Color.Cyan),
(r' +', pygments.token.Text),
+ (r'\n', pygments.token.Text, '#pop'),
],
'failures': [
(r'(?=^=+ )', pygments.token.Text, '#pop'),
@@ -61,13 +114,33 @@
],
}
+ # the progress percentage is annoyingly stateful
+ _PROGRESS = (r'^(?=.+\[ *\d+%\]$)', pygments.token.Text)
+ _WARN = (r'SKIPPED|XPASS|XFAIL|xfail|s|X|x', Color.Yellow)
+ _WARN_P = (*_WARN, ('root_w', 'progress_line_w'))
+ _ERR = (r'ERROR|FAILED|E|F', Color.Red)
+ _ERR_P = (*_ERR, ('root_e', 'progress_line_e'))
+ _PERCENT = r'\[ *\d+%\]'
-COLORS = {
- 'Cyan': '#06989a', 'Green': '#4e9a06', 'Red': '#c00', 'Yellow': '#c4a000',
-}
+ tokens['root_w'] = list(tokens['root'])
+ tokens['root_e'] = list(tokens['root'])
+
+ tokens['root'].insert(0, (*_PROGRESS, 'progress_line'))
+ tokens['root_w'].insert(0, (*_PROGRESS, 'progress_line_w'))
+ tokens['root_e'].insert(0, (*_PROGRESS, 'progress_line_e'))
+
+ tokens['progress_line_w'] = list(tokens['progress_line'])
+ tokens['progress_line_e'] = list(tokens['progress_line'])
+
+ tokens['progress_line'].extend((_WARN_P, _ERR_P, (_PERCENT, Color.Green)))
+ tokens['progress_line_w'].extend((_WARN, _ERR_P, (_PERCENT, Color.Yellow)))
+ tokens['progress_line_e'].extend((_WARN, _ERR, (_PERCENT, Color.Red)))
+
+
+COLORS = {'Green': '#4e9a06', 'Red': '#c00', 'Yellow': '#c4a000'}
-def stylesheet(colors=None):
+def stylesheet(colors: Optional[Dict[str, str]] = None) -> str:
colors = colors or {}
assert set(colors) <= set(COLORS), set(colors) - set(COLORS)
return '.-Color-Bold { font-weight: bold; }\n' + ''.join(
@@ -77,8 +150,8 @@
)
-def setup(app): # pragma: no cover (sphinx)
- def copy_stylesheet(app, exception):
+def setup(app: Any) -> None: # pragma: no cover (sphinx)
+ def copy_stylesheet(app: Any, exception: Optional[Exception]) -> None:
if exception:
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/setup.cfg
new/pygments-pytest-2.0.0/setup.cfg
--- old/pygments-pytest-1.3.1/setup.cfg 2019-10-21 20:30:33.000000000 +0200
+++ new/pygments-pytest-2.0.0/setup.cfg 2020-02-28 00:45:38.000000000 +0100
@@ -1,6 +1,6 @@
[metadata]
name = pygments_pytest
-version = 1.3.1
+version = 2.0.0
description = A pygments lexer for pytest output.
long_description = file: README.md
long_description_content_type = text/markdown
@@ -11,20 +11,19 @@
license_file = LICENSE
classifiers =
License :: OSI Approved :: MIT License
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
- Programming Language :: Python :: 3.4
- Programming Language :: Python :: 3.5
+ Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
[options]
py_modules = pygments_pytest
-install_requires = pygments
-python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+install_requires =
+ pygments
+python_requires = >=3.6.1
[options.entry_points]
pygments.lexers =
@@ -32,3 +31,16 @@
[bdist_wheel]
universal = True
+
+[mypy]
+check_untyped_defs = true
+disallow_any_generics = true
+disallow_incomplete_defs = true
+disallow_untyped_defs = true
+no_implicit_optional = true
+
+[mypy-testing.*]
+disallow_untyped_defs = false
+
+[mypy-tests.*]
+disallow_untyped_defs = false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/testing/make-index
new/pygments-pytest-2.0.0/testing/make-index
--- old/pygments-pytest-1.3.1/testing/make-index 2019-10-21
20:30:33.000000000 +0200
+++ new/pygments-pytest-2.0.0/testing/make-index 2020-02-28
00:45:38.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
@@ -11,13 +11,14 @@
'''
-def main():
- links = [
- '<li><a href="demo/{filename}">{filename}</a></li>'.format(filename=f)
+def main() -> int:
+ links = "".join(
+ f'<li><a href="demo/{f}">{f}</a></li>'
for f in sorted(os.listdir('demo')) if f.endswith('_pytest.html')
- ]
+ )
with open('index.html', 'w') as f:
- f.write(HTML.format('<ul>{}</ul>'.format(''.join(links))))
+ f.write(HTML.format(f'<ul>{links}</ul>'))
+ return 0
if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/tests/pygments_pytest_test.py
new/pygments-pytest-2.0.0/tests/pygments_pytest_test.py
--- old/pygments-pytest-1.3.1/tests/pygments_pytest_test.py 2019-10-21
20:30:33.000000000 +0200
+++ new/pygments-pytest-2.0.0/tests/pygments_pytest_test.py 2020-02-28
00:45:38.000000000 +0100
@@ -16,6 +16,7 @@
NORM_WS_START_RE = re.compile(r'(<[^/][^>]+>)(\s*)')
NORM_WS_END_RE = re.compile(r'(\s*)(</[^>]+>)')
EMPTY_TAG_RE = re.compile(r'<[^/][^>]+></[^>]+>')
+TAG_WITH_WS = re.compile(r'(<[^/][^>]+>)([^<]*\s[^<]*)(</[^>]+>)')
DEMO_DIR = os.path.join(os.path.dirname(__file__), '../demo')
@@ -37,6 +38,16 @@
ret = NORM_WS_START_RE.sub(r'\2\1', ret)
ret = NORM_WS_END_RE.sub(r'\2\1', ret)
ret = EMPTY_TAG_RE.sub('', ret)
+
+ def ws_cb(match):
+ parts = re.split(r'(\s+)', match[2])
+ return ''.join(
+ f'{match[1]}{part}{match[3]}' if not part.isspace() else part
+ for part in parts
+ )
+
+ ret = TAG_WITH_WS.sub(ws_cb, ret)
+
return HTML.replace('HTML', ret)
@@ -51,11 +62,11 @@
ansi = highlight(ANSI_LEXER, ret.stdout.str())
pytest = highlight(PYTEST_LEXER, uncolor(ret.stdout.str()))
- fname = '{}_ansi.html'.format(request.node.name)
+ fname = f'{request.node.name}_ansi.html'
with open(os.path.join(DEMO_DIR, fname), 'w') as f:
f.write(ansi)
- fname = '{}_pytest.html'.format(request.node.name)
+ fname = f'{request.node.name}_pytest.html'
with open(os.path.join(DEMO_DIR, fname), 'w') as f:
f.write(pytest)
@@ -77,6 +88,7 @@
DIFFERENT_TYPES_SRC = '''\
+import warnings
import pytest
def inc(x):
@@ -109,6 +121,9 @@
def test_error(s):
pass
+
+def test_warning():
+ warnings.warn(UserWarning("WARNING!"))
'''
@@ -128,7 +143,7 @@
compare(
'import pytest\n'
'def test():\n'
- ' pytest.raises(ValueError, "int(None)")\n'
+ ' pytest.raises(ValueError, "int(None)")\n',
)
@@ -152,7 +167,7 @@
compare(
'import pytest\n'
'@pytest.mark.xfail\n'
- 'def test(): pass\n'
+ 'def test(): pass\n',
)
@@ -161,7 +176,7 @@
'import pytest\n'
'@pytest.mark.xfail\n'
'def test():\n'
- ' assert False\n'
+ ' assert False\n',
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pygments-pytest-1.3.1/tox.ini
new/pygments-pytest-2.0.0/tox.ini
--- old/pygments-pytest-1.3.1/tox.ini 2019-10-21 20:30:33.000000000 +0200
+++ new/pygments-pytest-2.0.0/tox.ini 2020-02-28 00:45:38.000000000 +0100
@@ -1,6 +1,5 @@
[tox]
-# These should match the travis env list
-envlist = py27,py35,py36,pypy,py36-pytest-master,py36-pytest-features
+envlist = py36,py37,py38,pypy3,py38-master,pre-commit
[testenv]
deps = -rrequirements-dev.txt
@@ -8,21 +7,20 @@
coverage erase
coverage run -m pytest {posargs:tests}
coverage report --fail-under 100
- pre-commit install -f --install-hooks
- pre-commit run --all-files
+ pre-commit install
-[testenv:py36-pytest-master]
+[testenv:py38-master]
commands =
pip install --upgrade git+https://github.com/pytest-dev/pytest@master
{[testenv]commands}
-[testenv:py36-pytest-features]
-commands =
- pip install --upgrade git+https://github.com/pytest-dev/pytest@features
- {[testenv]commands}
+[testenv:pre-commit]
+skip_install = true
+deps = pre-commit
+commands = pre-commit run --all-files --show-diff-on-failure
[testenv:push]
-passenv = TRAVIS_* GH_TOKEN
+passenv = GITHUB_* GH_TOKEN
commands =
{[testenv]commands}
{toxinidir}/testing/make-index