Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-datadir for
openSUSE:Factory checked in at 2023-05-09 13:06:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-datadir (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-datadir.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-datadir"
Tue May 9 13:06:28 2023 rev:4 rq:1084904 version:1.4.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-datadir/python-pytest-datadir.changes
2021-12-08 22:10:36.810909248 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-datadir.new.1533/python-pytest-datadir.changes
2023-05-09 13:06:37.676767464 +0200
@@ -1,0 +2,10 @@
+Thu May 4 23:11:59 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 1.4.1:
+ * Replace usage of ``tmpdir`` by ``tmp_path``
+ * Fix package so the ``LICENSE`` file is no longer in the root
+ of the package.
+ * Python 3.9 and 3.10 are now officially supported.
+ * Python 2.7, 3.4 and 3.5 are no longer supported.
+
+-------------------------------------------------------------------
Old:
----
pytest-datadir-1.3.1.tar.gz
New:
----
pytest-datadir-1.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-datadir.spec ++++++
--- /var/tmp/diff_new_pack.RS8lsQ/_old 2023-05-09 13:06:38.304771202 +0200
+++ /var/tmp/diff_new_pack.RS8lsQ/_new 2023-05-09 13:06:38.308771226 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-datadir
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,9 +16,9 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%{?sle15_python_module_pythons}
Name: python-pytest-datadir
-Version: 1.3.1
+Version: 1.4.1
Release: 0
Summary: Plugin for test data directories and files
License: MIT
@@ -48,7 +48,6 @@
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-rm %{buildroot}%{_prefix}/LICENSE
%check
%pytest
@@ -56,6 +55,7 @@
%files %{python_files}
%doc AUTHORS CHANGELOG.rst README.md
%license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/pytest_datadir
+%{python_sitelib}/pytest_datadir*.egg-info
%changelog
++++++ pytest-datadir-1.3.1.tar.gz -> pytest-datadir-1.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/.flake8
new/pytest-datadir-1.4.1/.flake8
--- old/pytest-datadir-1.3.1/.flake8 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-datadir-1.4.1/.flake8 2022-10-25 13:17:00.000000000 +0200
@@ -0,0 +1,3 @@
+[flake8]
+max-line-length=88
+extend-ignore=E203,D104,D100,I004
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/.github/workflows/main.yml
new/pytest-datadir-1.4.1/.github/workflows/main.yml
--- old/pytest-datadir-1.3.1/.github/workflows/main.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-datadir-1.4.1/.github/workflows/main.yml 2022-10-25
13:17:00.000000000 +0200
@@ -0,0 +1,66 @@
+name: build
+
+on: [push, pull_request]
+
+jobs:
+ build:
+
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ python: ["3.6", "3.7", "3.8", "3.9", "3.10"]
+ os: [ubuntu-latest, windows-latest, macos-latest]
+ include:
+ - python: "3.6"
+ tox_env: "py36"
+ - python: "3.7"
+ tox_env: "py37"
+ - python: "3.8"
+ tox_env: "py38"
+ - python: "3.9"
+ tox_env: "py39"
+ - python: "3.10"
+ tox_env: "py310"
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python }}
+ - name: Install tox
+ run: |
+ python -m pip install --upgrade pip
+ python -m pip install tox
+ - name: Test
+ run: |
+ tox -e ${{ matrix.tox_env }}
+
+ deploy:
+
+ if: github.event_name == 'push' && startsWith(github.event.ref,
'refs/tags')
+
+ runs-on: ubuntu-latest
+
+ needs: build
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.9"
+ - name: Install wheel
+ run: |
+ python -m pip install --upgrade pip
+ python -m pip install build
+ - name: Build package
+ run: |
+ python -m build
+ - name: Publish package to PyPI
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: __token__
+ password: ${{ secrets.pypi_token }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/.pre-commit-config.yaml
new/pytest-datadir-1.4.1/.pre-commit-config.yaml
--- old/pytest-datadir-1.3.1/.pre-commit-config.yaml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-datadir-1.4.1/.pre-commit-config.yaml 2022-10-25
13:17:00.000000000 +0200
@@ -0,0 +1,50 @@
+exclude: (?x)(\.txt)
+repos:
+- repo: https://github.com/PyCQA/autoflake
+ rev: v1.7.6
+ hooks:
+ - id: autoflake
+ name: autoflake
+ args: ["--in-place", "--remove-unused-variables",
"--remove-all-unused-imports"]
+ language: python
+ files: \.py$
+- repo: https://github.com/asottile/reorder_python_imports
+ rev: v3.8.5
+ hooks:
+ - id: reorder-python-imports
+- repo: https://github.com/psf/black
+ rev: 22.10.0
+ hooks:
+ - id: black
+ args: [--safe, --quiet]
+- repo: https://github.com/asottile/blacken-docs
+ rev: v1.12.1
+ hooks:
+ - id: blacken-docs
+ additional_dependencies: [black==22.8.0]
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.3.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: fix-encoding-pragma
+ args: [--remove]
+ - id: check-yaml
+ exclude: tests
+ - id: check-toml
+ - id: check-json
+ - id: check-merge-conflict
+ - id: pretty-format-json
+ args: [--autofix]
+ - id: debug-statements
+ language_version: python3
+- repo: https://github.com/PyCQA/flake8
+ rev: 5.0.4
+ hooks:
+ - id: flake8
+ exclude: tests/data
+ language_version: python3
+ additional_dependencies:
+ - flake8-typing-imports==1.9.0
+ - flake8-builtins==1.5.3
+ - flake8-bugbear==20.1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/.travis.yml
new/pytest-datadir-1.4.1/.travis.yml
--- old/pytest-datadir-1.3.1/.travis.yml 2019-10-22 15:04:06.000000000
+0200
+++ new/pytest-datadir-1.4.1/.travis.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,36 +0,0 @@
-sudo: false
-language: python
-stages:
-- test
-- name: deploy
- if: repo = gabrielcnr/pytest-datadir AND tag IS present
-
-python:
- - "2.7"
- - "3.4"
- - "3.5"
- - "3.6"
- - "3.7"
- - "3.8"
-install:
- - pip install --upgrade setuptools pip
- - pip install tox-travis
-script: tox
-
-jobs:
- include:
- - stage: deploy
- python: '3.7'
- 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:
JS4D2aJ2WsihjWbkm1/Y1BFEDWO+G+1Zba//jGROkRpO/gBaTC+f9pNUw8J6EhH5313D0cewIwQ20LF98630h7WlfYtQtqyXFqsCt5kXkvfaLel7K3qAzCwBuNIOYhR2tH4OuNyn8ORwmi1yJWSYfxv4Lf8VVatuw8PO3RKKAtv2u8kcWI2+J2dkJ/uDHWIcXxjoKFMgEcI49BxXhfVJa6jLG0E4ayegbALNWfoDS2zi8/pF5FKdMGAZYS9bsqxINAPezWpaRYu7gwrXPbOvY8vsUGBQ5CRXFUL7J+3bbCcLnYoJamiO7OhjGQDCrr0F5UIrdmgNXlTw2YaIT3h0mBjRWwXi07Ujq7MFOGJD+AqNUPFDI0FG0H1yEAofz0nTchjXPhALJj4hFnYnY3er7IlD5nVvArm+iX5cKv9IO1SqJ7nZnSKAhKgG9bF7GDXBWOPcqujv38+e3plhO2bdeoQvqW+5CZTIxJQI0WaZsb6xv6zvdzFDIdEFEbe228Zf+5sQdCj979p54Amu5YIXLE7SFBLqY7p6iUqj6bGNhXjxIvxU0d6fGNEmVY7mIL+/BqFUkCbGAFOkUux/LWSw6bFjh0VjxwV0GwTTlETgXF3Gwz+MqzrREQTm8yGZQ/x7XamhNu9eg00IaCERlGm+Mw3KMPcVYKORJ238eRmHDQw=
- on:
- tags: true
- repo: gabrielcnr/pytest-datadir
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/AUTHORS
new/pytest-datadir-1.4.1/AUTHORS
--- old/pytest-datadir-1.3.1/AUTHORS 2019-10-22 15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/AUTHORS 2022-10-25 13:17:00.000000000 +0200
@@ -5,3 +5,4 @@
Gabriel Reis
Guilherme Quentel Melo
Mauricio Lima
+Marcelo Duarte Trevisani
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/CHANGELOG.rst
new/pytest-datadir-1.4.1/CHANGELOG.rst
--- old/pytest-datadir-1.3.1/CHANGELOG.rst 2019-10-22 15:04:06.000000000
+0200
+++ new/pytest-datadir-1.4.1/CHANGELOG.rst 2022-10-25 13:17:00.000000000
+0200
@@ -1,6 +1,18 @@
pytest-datadir
==============
+1.4.1 (2022-10-24)
+------------------
+- Replace usage of ``tmpdir`` by ``tmp_path`` (`#48
<https://github.com/gabrielcnr/pytest-datadir/pull/48>`__).
+
+
+1.4.0 (2022-01-18)
+------------------
+
+- Fix package so the ``LICENSE`` file is no longer in the root of the package.
+- Python 3.9 and 3.10 are now officially supported.
+- Python 2.7, 3.4 and 3.5 are no longer supported.
+
1.3.1 (2019-10-22)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/LICENSE
new/pytest-datadir-1.4.1/LICENSE
--- old/pytest-datadir-1.3.1/LICENSE 2019-10-22 15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/LICENSE 2022-10-25 13:17:00.000000000 +0200
@@ -1,6 +1,6 @@
This is the MIT license: http://www.opensource.org/licenses/mit-license.php
-Copyright (c) 2015-2016 the pytest-datadir authors and contributors <see
AUTHORS file>.
+Copyright (c) 2015-2022 the pytest-datadir authors and contributors <see
AUTHORS file>.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this
software and associated documentation files (the "Software"), to deal in the
Software
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/MANIFEST.in
new/pytest-datadir-1.4.1/MANIFEST.in
--- old/pytest-datadir-1.3.1/MANIFEST.in 2019-10-22 15:04:06.000000000
+0200
+++ new/pytest-datadir-1.4.1/MANIFEST.in 1970-01-01 01:00:00.000000000
+0100
@@ -1,2 +0,0 @@
-include LICENSE
-include README.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/PKG-INFO
new/pytest-datadir-1.4.1/PKG-INFO
--- old/pytest-datadir-1.3.1/PKG-INFO 2019-10-22 15:04:21.000000000 +0200
+++ new/pytest-datadir-1.4.1/PKG-INFO 2022-10-25 13:17:12.004056500 +0200
@@ -1,81 +1,82 @@
Metadata-Version: 2.1
Name: pytest-datadir
-Version: 1.3.1
+Version: 1.4.1
Summary: pytest plugin for test data directories and files
Home-page: http://github.com/gabrielcnr/pytest-datadir
Author: Gabriel Reis
Author-email: [email protected]
License: MIT
-Description: # pytest-datadir
-
- pytest plugin for manipulating test data directories and files.
-
- [](https://travis-ci.org/gabrielcnr/pytest-datadir)
-
[](https://pypi.python.org/pypi/pytest-datadir)
-
[](https://pypi.python.org/pypi/pytest-datadir)
-
[](https://anaconda.org/conda-forge/pytest-datadir)
-
-
- # Usage
- pytest-datadir will look up for a directory with the name of your
module or the global 'data' folder.
- Let's say you have a structure like this:
-
- ```
- .
- âââ data/
- â  âââ hello.txt
- âââ test_hello/
- â  âââ spam.txt
- âââ test_hello.py
- ```
- You can access the contents of these files using injected variables
`datadir` (for *test_* folder) or `shared_datadir`
- (for *data* folder):
-
- ```python
- def test_read_global(shared_datadir):
- contents = (shared_datadir / 'hello.txt').read_text()
- assert contents == 'Hello World!\n'
-
- def test_read_module(datadir):
- contents = (datadir / 'spam.txt').read_text()
- assert contents == 'eggs\n'
- ```
-
- pytest-datadir will copy the original file to a temporary folder, so
changing the file contents won't change the original data file.
-
- Both `datadir` and `shared_datadir` fixtures are `pathlib.Path`
objects.
-
- # Releases
-
- Follow these steps to make a new release:
-
- 1. Create a new branch `release-X.Y.Z` from `master`.
- 2. Update `CHANGELOG.rst`.
- 3. Open a PR.
- 4. After it is **green** and **approved**, push a new tag in the
format `X.Y.Z`.
-
- Travis will deploy to PyPI automatically.
-
- Afterwards, update the recipe in
[conda-forge/pytest-datadir-feedstock](https://github.com/conda-forge/pytest-datadir-feedstock).
-
- # License
-
- MIT.
-
-
Keywords: pytest test unittest directory file
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Requires-Python: >=3.6
Description-Content-Type: text/markdown
+License-File: LICENSE
+License-File: AUTHORS
+
+# pytest-datadir
+
+pytest plugin for manipulating test data directories and files.
+
+[](https://github.com/gabrielcnr/pytest-datadir/workflows/build/badge.svg?branch=master)
+[](https://pypi.python.org/pypi/pytest-datadir)
+[](https://anaconda.org/conda-forge/pytest-datadir)
+
+[](https://github.com/psf/black)
+
+
+# Usage
+pytest-datadir will look up for a directory with the name of your module or
the global 'data' folder.
+Let's say you have a structure like this:
+
+```
+.
+âââ data/
+â  âââ hello.txt
+âââ test_hello/
+â  âââ spam.txt
+âââ test_hello.py
+```
+You can access the contents of these files using injected variables `datadir`
(for *test_* folder) or `shared_datadir`
+(for *data* folder):
+
+```python
+def test_read_global(shared_datadir):
+ contents = (shared_datadir / "hello.txt").read_text()
+ assert contents == "Hello World!\n"
+
+
+def test_read_module(datadir):
+ contents = (datadir / "spam.txt").read_text()
+ assert contents == "eggs\n"
+```
+
+pytest-datadir will copy the original file to a temporary folder, so changing
the file contents won't change the original data file.
+
+Both `datadir` and `shared_datadir` fixtures are `pathlib.Path` objects.
+
+# Releases
+
+Follow these steps to make a new release:
+
+1. Create a new branch `release-X.Y.Z` from `master`.
+2. Update `CHANGELOG.rst`.
+3. Open a PR.
+4. After it is **green** and **approved**, push a new tag in the format
`X.Y.Z`.
+
+Travis will deploy to PyPI automatically.
+
+Afterwards, update the recipe in
[conda-forge/pytest-datadir-feedstock](https://github.com/conda-forge/pytest-datadir-feedstock).
+
+# License
+
+MIT.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/README.md
new/pytest-datadir-1.4.1/README.md
--- old/pytest-datadir-1.3.1/README.md 2019-10-22 15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/README.md 2022-10-25 13:17:00.000000000 +0200
@@ -2,10 +2,11 @@
pytest plugin for manipulating test data directories and files.
-[](https://travis-ci.org/gabrielcnr/pytest-datadir)
+[](https://github.com/gabrielcnr/pytest-datadir/workflows/build/badge.svg?branch=master)
[](https://pypi.python.org/pypi/pytest-datadir)
-[](https://pypi.python.org/pypi/pytest-datadir)
[](https://anaconda.org/conda-forge/pytest-datadir)
+
+[](https://github.com/psf/black)
# Usage
@@ -25,12 +26,13 @@
```python
def test_read_global(shared_datadir):
- contents = (shared_datadir / 'hello.txt').read_text()
- assert contents == 'Hello World!\n'
+ contents = (shared_datadir / "hello.txt").read_text()
+ assert contents == "Hello World!\n"
+
def test_read_module(datadir):
- contents = (datadir / 'spam.txt').read_text()
- assert contents == 'eggs\n'
+ contents = (datadir / "spam.txt").read_text()
+ assert contents == "eggs\n"
```
pytest-datadir will copy the original file to a temporary folder, so changing
the file contents won't change the original data file.
@@ -53,4 +55,3 @@
# License
MIT.
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/appveyor.yml
new/pytest-datadir-1.4.1/appveyor.yml
--- old/pytest-datadir-1.3.1/appveyor.yml 2019-10-22 15:04:06.000000000
+0200
+++ new/pytest-datadir-1.4.1/appveyor.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,13 +0,0 @@
-init:
- - git config --system core.longpaths true
-
-install:
- - C:\Python37\python -m pip install -U pip
- - C:\Python37\python -m pip install tox
-
-build: false
-
-test_script:
- - C:\Python37\scripts\tox
-
-skip_tags: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/setup.cfg
new/pytest-datadir-1.4.1/setup.cfg
--- old/pytest-datadir-1.3.1/setup.cfg 2019-10-22 15:04:21.000000000 +0200
+++ new/pytest-datadir-1.4.1/setup.cfg 2022-10-25 13:17:12.004056500 +0200
@@ -1,6 +1,3 @@
-[bdist_wheel]
-universal = 1
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/setup.py
new/pytest-datadir-1.4.1/setup.py
--- old/pytest-datadir-1.3.1/setup.py 2019-10-22 15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/setup.py 2022-10-25 13:17:00.000000000 +0200
@@ -1,47 +1,45 @@
import io
-import re
-from setuptools import find_packages, setup
+from setuptools import find_packages
+from setuptools import setup
-
-with io.open('README.md', encoding='UTF-8') as fp:
+with io.open("README.md", encoding="UTF-8") as fp:
long_description = fp.read()
setup(
name="pytest-datadir",
use_scm_version={"write_to": "src/pytest_datadir/_version.py"},
- setup_requires=['setuptools_scm'],
packages=find_packages(where="src"),
entry_points={
- 'pytest11': ['pytest-datadir = pytest_datadir.plugin'],
+ "pytest11": ["pytest-datadir = pytest_datadir.plugin"],
},
package_dir={"": "src"},
- install_requires=['pytest>=2.7.0'],
- data_files = [("", ["LICENSE"])],
- author='Gabriel Reis',
- author_email='[email protected]',
- description='pytest plugin for test data directories and files',
+ setup_requires=[
+ "setuptools_scm; python_version>'3.6'",
+ "setuptools_scm <7.0; python_version=='3.6'",
+ ],
+ install_requires=["pytest>=5.0"],
+ author="Gabriel Reis",
+ author_email="[email protected]",
+ description="pytest plugin for test data directories and files",
long_description=long_description,
long_description_content_type="text/markdown",
-
- license='MIT',
- keywords='pytest test unittest directory file',
- extras_require={':python_version<"3.4"': ['pathlib2']},
- url='http://github.com/gabrielcnr/pytest-datadir',
- python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
+ license="MIT",
+ keywords="pytest test unittest directory file",
+ url="http://github.com/gabrielcnr/pytest-datadir",
+ python_requires=">=3.6",
classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: MIT License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: 3.8',
- 'Topic :: Software Development :: Quality Assurance',
- 'Topic :: Software Development :: Testing',
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Topic :: Software Development :: Quality Assurance",
+ "Topic :: Software Development :: Testing",
],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/src/pytest_datadir/__init__.py
new/pytest-datadir-1.4.1/src/pytest_datadir/__init__.py
--- old/pytest-datadir-1.3.1/src/pytest_datadir/__init__.py 2019-10-22
15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/src/pytest_datadir/__init__.py 2022-10-25
13:17:00.000000000 +0200
@@ -1,7 +1,6 @@
-from __future__ import absolute_import
-
try:
from ._version import version
+
__version__ = version
except ImportError:
- __version__ = version = 'unknown'
+ __version__ = version = "unknown"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/src/pytest_datadir/_version.py
new/pytest-datadir-1.4.1/src/pytest_datadir/_version.py
--- old/pytest-datadir-1.3.1/src/pytest_datadir/_version.py 2019-10-22
15:04:21.000000000 +0200
+++ new/pytest-datadir-1.4.1/src/pytest_datadir/_version.py 2022-10-25
13:17:11.000000000 +0200
@@ -1,4 +1,5 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '1.3.1'
+__version__ = version = '1.4.1'
+__version_tuple__ = version_tuple = (1, 4, 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/src/pytest_datadir/plugin.py
new/pytest-datadir-1.4.1/src/pytest_datadir/plugin.py
--- old/pytest-datadir-1.3.1/src/pytest_datadir/plugin.py 2019-10-22
15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/src/pytest_datadir/plugin.py 2022-10-25
13:17:00.000000000 +0200
@@ -1,35 +1,33 @@
import os
import shutil
import sys
-
-if sys.version_info[0] == 2:
- from pathlib2 import Path
-else:
- from pathlib import Path
+from pathlib import Path
import pytest
def _win32_longpath(path):
- '''
- Helper function to add the long path prefix for Windows, so that
shutil.copytree won't fail
- while working with paths with 255+ chars.
- '''
- if sys.platform == 'win32':
- # The use of os.path.normpath here is necessary since "the "\\?\"
prefix to a path string
- # tells the Windows APIs to disable all string parsing and to send the
string that follows
- # it straight to the file system".
+ """
+ Helper function to add the long path prefix for Windows, so that
shutil.copytree
+ won't fail while working with paths with 255+ chars.
+ """
+ if sys.platform == "win32":
+ # The use of os.path.normpath here is necessary since "the "\\?\"
prefix
+ # to a path string tells the Windows APIs to disable all string parsing
+ # and to send the string that follows it straight to the file system".
# (See
https://docs.microsoft.com/pt-br/windows/desktop/FileIO/naming-a-file)
- return '\\\\?\\' + os.path.normpath(path)
+ return "\\\\?\\" + os.path.normpath(path)
else:
return path
@pytest.fixture
-def shared_datadir(request, tmpdir):
- original_shared_path = os.path.join(request.fspath.dirname, 'data')
- temp_path = Path(str(tmpdir.join('data')))
- shutil.copytree(_win32_longpath(original_shared_path),
_win32_longpath(str(temp_path)))
+def shared_datadir(request, tmp_path):
+ original_shared_path = os.path.join(request.fspath.dirname, "data")
+ temp_path = tmp_path / "data"
+ shutil.copytree(
+ _win32_longpath(original_shared_path), _win32_longpath(str(temp_path))
+ )
return temp_path
@@ -39,10 +37,12 @@
@pytest.fixture
-def datadir(original_datadir, tmpdir):
- result = Path(str(tmpdir.join(original_datadir.stem)))
+def datadir(original_datadir, tmp_path):
+ result = tmp_path / original_datadir.stem
if original_datadir.is_dir():
- shutil.copytree(_win32_longpath(str(original_datadir)),
_win32_longpath(str(result)))
+ shutil.copytree(
+ _win32_longpath(str(original_datadir)),
_win32_longpath(str(result))
+ )
else:
result.mkdir()
return result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/PKG-INFO
new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/PKG-INFO
--- old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/PKG-INFO
2019-10-22 15:04:21.000000000 +0200
+++ new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/PKG-INFO
2022-10-25 13:17:11.000000000 +0200
@@ -1,81 +1,82 @@
Metadata-Version: 2.1
Name: pytest-datadir
-Version: 1.3.1
+Version: 1.4.1
Summary: pytest plugin for test data directories and files
Home-page: http://github.com/gabrielcnr/pytest-datadir
Author: Gabriel Reis
Author-email: [email protected]
License: MIT
-Description: # pytest-datadir
-
- pytest plugin for manipulating test data directories and files.
-
- [](https://travis-ci.org/gabrielcnr/pytest-datadir)
-
[](https://pypi.python.org/pypi/pytest-datadir)
-
[](https://pypi.python.org/pypi/pytest-datadir)
-
[](https://anaconda.org/conda-forge/pytest-datadir)
-
-
- # Usage
- pytest-datadir will look up for a directory with the name of your
module or the global 'data' folder.
- Let's say you have a structure like this:
-
- ```
- .
- âââ data/
- â  âââ hello.txt
- âââ test_hello/
- â  âââ spam.txt
- âââ test_hello.py
- ```
- You can access the contents of these files using injected variables
`datadir` (for *test_* folder) or `shared_datadir`
- (for *data* folder):
-
- ```python
- def test_read_global(shared_datadir):
- contents = (shared_datadir / 'hello.txt').read_text()
- assert contents == 'Hello World!\n'
-
- def test_read_module(datadir):
- contents = (datadir / 'spam.txt').read_text()
- assert contents == 'eggs\n'
- ```
-
- pytest-datadir will copy the original file to a temporary folder, so
changing the file contents won't change the original data file.
-
- Both `datadir` and `shared_datadir` fixtures are `pathlib.Path`
objects.
-
- # Releases
-
- Follow these steps to make a new release:
-
- 1. Create a new branch `release-X.Y.Z` from `master`.
- 2. Update `CHANGELOG.rst`.
- 3. Open a PR.
- 4. After it is **green** and **approved**, push a new tag in the
format `X.Y.Z`.
-
- Travis will deploy to PyPI automatically.
-
- Afterwards, update the recipe in
[conda-forge/pytest-datadir-feedstock](https://github.com/conda-forge/pytest-datadir-feedstock).
-
- # License
-
- MIT.
-
-
Keywords: pytest test unittest directory file
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Requires-Python: >=3.6
Description-Content-Type: text/markdown
+License-File: LICENSE
+License-File: AUTHORS
+
+# pytest-datadir
+
+pytest plugin for manipulating test data directories and files.
+
+[](https://github.com/gabrielcnr/pytest-datadir/workflows/build/badge.svg?branch=master)
+[](https://pypi.python.org/pypi/pytest-datadir)
+[](https://anaconda.org/conda-forge/pytest-datadir)
+
+[](https://github.com/psf/black)
+
+
+# Usage
+pytest-datadir will look up for a directory with the name of your module or
the global 'data' folder.
+Let's say you have a structure like this:
+
+```
+.
+âââ data/
+â  âââ hello.txt
+âââ test_hello/
+â  âââ spam.txt
+âââ test_hello.py
+```
+You can access the contents of these files using injected variables `datadir`
(for *test_* folder) or `shared_datadir`
+(for *data* folder):
+
+```python
+def test_read_global(shared_datadir):
+ contents = (shared_datadir / "hello.txt").read_text()
+ assert contents == "Hello World!\n"
+
+
+def test_read_module(datadir):
+ contents = (datadir / "spam.txt").read_text()
+ assert contents == "eggs\n"
+```
+
+pytest-datadir will copy the original file to a temporary folder, so changing
the file contents won't change the original data file.
+
+Both `datadir` and `shared_datadir` fixtures are `pathlib.Path` objects.
+
+# Releases
+
+Follow these steps to make a new release:
+
+1. Create a new branch `release-X.Y.Z` from `master`.
+2. Update `CHANGELOG.rst`.
+3. Open a PR.
+4. After it is **green** and **approved**, push a new tag in the format
`X.Y.Z`.
+
+Travis will deploy to PyPI automatically.
+
+Afterwards, update the recipe in
[conda-forge/pytest-datadir-feedstock](https://github.com/conda-forge/pytest-datadir-feedstock).
+
+# License
+
+MIT.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/SOURCES.txt
new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/SOURCES.txt
--- old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/SOURCES.txt
2019-10-22 15:04:21.000000000 +0200
+++ new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/SOURCES.txt
2022-10-25 13:17:11.000000000 +0200
@@ -1,14 +1,13 @@
+.flake8
.gitignore
-.travis.yml
+.pre-commit-config.yaml
AUTHORS
CHANGELOG.rst
LICENSE
-MANIFEST.in
README.md
-appveyor.yml
-setup.cfg
setup.py
tox.ini
+.github/workflows/main.yml
src/pytest_datadir/__init__.py
src/pytest_datadir/_version.py
src/pytest_datadir/plugin.py
@@ -20,11 +19,9 @@
src/pytest_datadir.egg-info/top_level.txt
tests/test_hello.py
tests/test_nonexistent.py
-tests/test_pathlib.py
tests/data/over.txt
tests/data/spam.txt
tests/data/shared_directory/file.txt
-tests/test_hello/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt
tests/test_hello/hello.txt
tests/test_hello/over.txt
tests/test_hello/local_directory/file.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/entry_points.txt
new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/entry_points.txt
--- old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/entry_points.txt
2019-10-22 15:04:21.000000000 +0200
+++ new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/entry_points.txt
2022-10-25 13:17:11.000000000 +0200
@@ -1,3 +1,2 @@
[pytest11]
pytest-datadir = pytest_datadir.plugin
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/requires.txt
new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/requires.txt
--- old/pytest-datadir-1.3.1/src/pytest_datadir.egg-info/requires.txt
2019-10-22 15:04:21.000000000 +0200
+++ new/pytest-datadir-1.4.1/src/pytest_datadir.egg-info/requires.txt
2022-10-25 13:17:11.000000000 +0200
@@ -1,4 +1 @@
-pytest>=2.7.0
-
-[:python_version<"3.4"]
-pathlib2
+pytest>=5.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/tests/data/over.txt
new/pytest-datadir-1.4.1/tests/data/over.txt
--- old/pytest-datadir-1.3.1/tests/data/over.txt 2019-10-22
15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/tests/data/over.txt 2022-10-25
13:17:00.000000000 +0200
@@ -1 +1 @@
-8000
+8000
\ No newline at end of file
Binary files
old/pytest-datadir-1.3.1/tests/test_hello/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt
and
new/pytest-datadir-1.4.1/tests/test_hello/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/tests/test_hello/over.txt
new/pytest-datadir-1.4.1/tests/test_hello/over.txt
--- old/pytest-datadir-1.3.1/tests/test_hello/over.txt 2019-10-22
15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/tests/test_hello/over.txt 2022-10-25
13:17:00.000000000 +0200
@@ -1 +1 @@
-9000
+9000
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/tests/test_hello.py
new/pytest-datadir-1.4.1/tests/test_hello.py
--- old/pytest-datadir-1.3.1/tests/test_hello.py 2019-10-22
15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/tests/test_hello.py 2022-10-25
13:17:00.000000000 +0200
@@ -1,67 +1,89 @@
-from __future__ import unicode_literals
import os
+from pathlib import Path
+
+import pytest
+
+
[email protected](autouse=True, scope="module")
+def create_long_file_path():
+ """
+ Create a very long file name to ensure datadir can copy it correctly.
+
+ We don't just create this file in the repository because this makes it
+ problematic to clone on Windows without LongPaths enabled in the system.
+ """
+ d = Path(__file__).with_suffix("")
+ old_cwd = os.getcwd()
+ try:
+ os.chdir(d)
+ Path("a" * 250 + ".txt").touch()
+ finally:
+ os.chdir(old_cwd)
def test_read_hello(datadir):
- assert set(os.listdir(str(datadir))) == {'local_directory', 'hello.txt',
'over.txt', 'a' * 250 + '.txt'}
- with (datadir/'hello.txt').open() as fp:
+ assert set(os.listdir(str(datadir))) == {
+ "local_directory",
+ "hello.txt",
+ "over.txt",
+ "a" * 250 + ".txt",
+ }
+ with (datadir / "hello.txt").open() as fp:
contents = fp.read()
- assert contents == 'Hello, world!\n'
+ assert contents == "Hello, world!\n"
def test_change_test_files(datadir, original_datadir, shared_datadir, request):
- filename = datadir / 'hello.txt'
- with filename.open('w') as fp:
- fp.write('Modified text!\n')
+ filename = datadir / "hello.txt"
+ with filename.open("w") as fp:
+ fp.write("Modified text!\n")
- original_filename = original_datadir / 'hello.txt'
+ original_filename = original_datadir / "hello.txt"
with original_filename.open() as fp:
- assert fp.read() == 'Hello, world!\n'
+ assert fp.read() == "Hello, world!\n"
with filename.open() as fp:
- assert fp.read() == 'Modified text!\n'
+ assert fp.read() == "Modified text!\n"
- shared_filename = shared_datadir/'over.txt'
- with shared_filename.open('w') as fp:
- fp.write('changed')
- shared_original = os.path.join(request.fspath.dirname, 'data', 'over.txt')
+ shared_filename = shared_datadir / "over.txt"
+ with shared_filename.open("w") as fp:
+ fp.write("changed")
+ shared_original = os.path.join(request.fspath.dirname, "data", "over.txt")
with open(shared_original) as fp:
- assert fp.read().strip() == '8000'
-
+ assert fp.read().strip() == "8000"
def test_read_spam_from_other_dir(shared_datadir):
- filename = shared_datadir / 'spam.txt'
+ filename = shared_datadir / "spam.txt"
with filename.open() as fp:
contents = fp.read()
- assert contents == 'eggs\n'
+ assert contents == "eggs\n"
def test_file_override(shared_datadir, datadir):
- """ The same file is in the module dir and global data.
- Shared files are kept in a different temp directory"""
- shared_filepath = shared_datadir/'over.txt'
- private_filepath = datadir/'over.txt'
+ """The same file is in the module dir and global data.
+ Shared files are kept in a different temp directory"""
+ shared_filepath = shared_datadir / "over.txt"
+ private_filepath = datadir / "over.txt"
assert shared_filepath.is_file()
assert private_filepath.is_file()
assert shared_filepath != private_filepath
def test_local_directory(datadir):
- directory = datadir/'local_directory'
+ directory = datadir / "local_directory"
assert directory.is_dir()
- filename = directory/'file.txt'
+ filename = directory / "file.txt"
assert filename.is_file()
with filename.open() as fp:
contents = fp.read()
- assert contents == 'local contents'
+ assert contents.strip() == "local contents"
def test_shared_directory(shared_datadir):
assert shared_datadir.is_dir()
- filename = shared_datadir/'shared_directory'/'file.txt'
+ filename = shared_datadir / "shared_directory" / "file.txt"
assert filename.is_file()
with filename.open() as fp:
contents = fp.read()
- assert contents == 'global contents'
-
+ assert contents.strip() == "global contents"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/tests/test_nonexistent.py
new/pytest-datadir-1.4.1/tests/test_nonexistent.py
--- old/pytest-datadir-1.3.1/tests/test_nonexistent.py 2019-10-22
15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/tests/test_nonexistent.py 2022-10-25
13:17:00.000000000 +0200
@@ -1,4 +1,2 @@
-
-
def test_missing_data_dir_starts_empty(datadir):
assert list(datadir.iterdir()) == []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/tests/test_pathlib.py
new/pytest-datadir-1.4.1/tests/test_pathlib.py
--- old/pytest-datadir-1.3.1/tests/test_pathlib.py 2019-10-22
15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/tests/test_pathlib.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-import sys
-import pytest
-
[email protected](sys.version_info[0] == 3, reason='Python 2 only')
-def test_correct_pathlib(datadir):
- """
- Dummy test that we are using the correct backport of Python 3's
- standard pathlib in Python 2.
- """
- (datadir / 'foo').mkdir(parents=True, exist_ok=True)
- (datadir / 'foo').mkdir(parents=True, exist_ok=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-datadir-1.3.1/tox.ini
new/pytest-datadir-1.4.1/tox.ini
--- old/pytest-datadir-1.3.1/tox.ini 2019-10-22 15:04:06.000000000 +0200
+++ new/pytest-datadir-1.4.1/tox.ini 2022-10-25 13:17:00.000000000 +0200
@@ -1,5 +1,5 @@
[tox]
-envlist = py{27,34,35,36,37}
+envlist = py{36,37,38,39,310}
[testenv]
commands=