Failure
Build: repos/community-any
Packages:
[python-pytest-mock-1.11.2-1-any.pkg.tar.xz,
python2-pytest-mock-1.11.2-1-any.pkg.tar.xz]
authorName: alium
authorEmail: alium at artixlinux.org
[1]https://orion.artixlinux.org/job/packagesPython/job/python-pytest-mo
ck/job/master/8/
References
1. https://orion.artixlinux.org/job/packagesPython/job/python-pytest-mock/job/master/8/
-------------- next part --------------
Push event to branch master
Querying the current revision of branch master...
Current revision of branch master is 92159f3d3a6bb5202c75a4a54e8bb29ac2c61551
Obtained Jenkinsfile from 92159f3d3a6bb5202c75a4a54e8bb29ac2c61551
Running in Durability level: PERFORMANCE_OPTIMIZED
Loading library artix-ci at master
Attempting to resolve master from remote references...
> git --version # timeout=10
> git ls-remote -- https://gitea.artixlinux.org/artix/pipeline-libs.git # timeout=10
Found match: refs/heads/master revision 77f77ff85eedb6eb60b64faf8c328ab86dbb479c
Warning: CredentialId "gitea-ci" could not be found.
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://gitea.artixlinux.org/artix/pipeline-libs.git # timeout=10
Fetching without tags
Fetching upstream changes from https://gitea.artixlinux.org/artix/pipeline-libs.git
> git --version # timeout=10
> git fetch --no-tags --force --progress -- https://gitea.artixlinux.org/artix/pipeline-libs.git +refs/heads/master:refs/remotes/origin/master # timeout=10
Checking out Revision 77f77ff85eedb6eb60b64faf8c328ab86dbb479c (master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 77f77ff85eedb6eb60b64faf8c328ab86dbb479c # timeout=10
Commit message: "Notify: remove fail condition"
[Gitea] Notifying branch build status: PENDING Build started...
[Gitea] Notified
[Pipeline] Start of Pipeline
[Pipeline] node
Still waiting to schedule task
Waiting for next available executor
Running on Jenkins in /build/jenkins/workspace/Python_python-pytest-mock_master
[Pipeline] {
[Pipeline] timestamps
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Prepare)
[Pipeline] checkout
[2019-12-23T19:39:51.279Z] Warning: CredentialId "jenkins-ci" could not be found.
[2019-12-23T19:39:51.280Z] Cloning the remote Git repository
[2019-12-23T19:39:51.280Z] Cloning with configured refspecs honoured and without tags
[2019-12-23T19:39:51.280Z] Cloning repository https://237b7412742b4068af4173944de150f12959f4d3@gitea.artixlinux.org/packagesPython/python-pytest-mock.git
[2019-12-23T19:39:51.280Z] > git init /build/jenkins/workspace/Python_python-pytest-mock_master # timeout=10
[2019-12-23T19:39:51.288Z] Fetching upstream changes from https://237b7412742b4068af4173944de150f12959f4d3@gitea.artixlinux.org/packagesPython/python-pytest-mock.git
[2019-12-23T19:39:51.288Z] > git --version # timeout=10
[2019-12-23T19:39:51.292Z] > git fetch --no-tags --force --progress -- https://237b7412742b4068af4173944de150f12959f4d3@gitea.artixlinux.org/packagesPython/python-pytest-mock.git +refs/heads/master:refs/remotes/origin/master # timeout=10
[2019-12-23T19:39:52.280Z] > git config remote.origin.url https://237b7412742b4068af4173944de150f12959f4d3@gitea.artixlinux.org/packagesPython/python-pytest-mock.git # timeout=10
[2019-12-23T19:39:52.286Z] > git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master # timeout=10
[2019-12-23T19:39:52.291Z] > git config remote.origin.url https://237b7412742b4068af4173944de150f12959f4d3@gitea.artixlinux.org/packagesPython/python-pytest-mock.git # timeout=10
[2019-12-23T19:39:52.295Z] Cleaning workspace
[2019-12-23T19:39:52.295Z] > git rev-parse --verify HEAD # timeout=10
[2019-12-23T19:39:52.300Z] No valid HEAD. Skipping the resetting
[2019-12-23T19:39:52.300Z] > git clean -fdx # timeout=10
[2019-12-23T19:39:52.304Z] Fetching without tags
[2019-12-23T19:39:52.304Z] Fetching upstream changes from https://237b7412742b4068af4173944de150f12959f4d3@gitea.artixlinux.org/packagesPython/python-pytest-mock.git
[2019-12-23T19:39:52.304Z] > git fetch --no-tags --force --progress -- https://237b7412742b4068af4173944de150f12959f4d3@gitea.artixlinux.org/packagesPython/python-pytest-mock.git +refs/heads/master:refs/remotes/origin/master # timeout=10
[2019-12-23T19:39:52.490Z] Checking out Revision 92159f3d3a6bb5202c75a4a54e8bb29ac2c61551 (master)
[2019-12-23T19:39:52.490Z] > git config core.sparsecheckout # timeout=10
[2019-12-23T19:39:52.495Z] > git checkout -f 92159f3d3a6bb5202c75a4a54e8bb29ac2c61551 # timeout=10
[2019-12-23T19:39:52.505Z] Commit message: "[trunk] -> [community] 'python-pytest-mock-1.11.2-1' add"
[2019-12-23T19:39:52.505Z] > git rev-list --no-walk bf5f1daf34bacad0e250875604f60bcc3922ff59 # timeout=10
[2019-12-23T19:39:52.525Z] [Gitea] Notifying branch build status: PENDING Build started...
[2019-12-23T19:39:52.674Z] [Gitea] Notified
[Pipeline] libraryResource
[Pipeline] readYaml
[Pipeline] sh
[2019-12-23T19:39:52.944Z] + git rev-parse @
[Pipeline] sh
[2019-12-23T19:39:53.202Z] + git show -s --format=%an 92159f3d3a6bb5202c75a4a54e8bb29ac2c61551
[Pipeline] sh
[2019-12-23T19:39:53.459Z] + git show -s --format=%ae 92159f3d3a6bb5202c75a4a54e8bb29ac2c61551
[Pipeline] sh
[2019-12-23T19:39:53.715Z] + git show --pretty=format: --name-status 92159f3d3a6bb5202c75a4a54e8bb29ac2c61551
[Pipeline] fileExists
[Pipeline] sh
[2019-12-23T19:39:54.030Z] + pkg2yaml repos/community-any
[Pipeline] readYaml
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] echo
[2019-12-23T19:39:54.108Z] isRebuild: false
[Pipeline] dir
[2019-12-23T19:39:54.112Z] Running in /build/jenkins/workspace/Python_python-pytest-mock_master/repos/community-any
[Pipeline] {
[Pipeline] sh
[2019-12-23T19:39:54.373Z] + buildpkg-galaxy
[2019-12-23T19:39:56.856Z] :: Synchronizing package databases...
[2019-12-23T19:39:56.856Z] system is up to date
[2019-12-23T19:39:56.856Z] world is up to date
[2019-12-23T19:39:56.856Z] downloading galaxy.db...
[2019-12-23T19:39:56.856Z] downloading extra.db...
[2019-12-23T19:39:57.107Z] downloading community.db...
[2019-12-23T19:39:57.657Z] :: Starting full system upgrade...
[2019-12-23T19:39:57.657Z] there is nothing to do
[2019-12-23T19:39:58.568Z] ==> Building in chroot for [default] (x86_64)...
[2019-12-23T19:39:59.911Z] ==> Synchronizing chroot copy [/build/buildpkg/default-x86_64/root] -> [jenkins]...done
[2019-12-23T19:40:00.821Z] ==> Making package: python-pytest-mock 1.11.2-1 (Mon Dec 23 20:40:00 2019)
[2019-12-23T19:40:00.821Z] ==> Retrieving sources...
[2019-12-23T19:40:00.821Z] -> Downloading python-pytest-mock-1.11.2.tar.gz...
[2019-12-23T19:40:00.821Z] % Total % Received % Xferd Average Speed Time Time Time Current
[2019-12-23T19:40:00.821Z] Dload Upload Total Spent Left Speed
[2019-12-23T19:40:01.372Z]
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 131 0 131 0 0 329 0 --:--:-- --:--:-- --:--:-- 330
[2019-12-23T19:40:01.872Z]
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 17924 0 17924 0 0 18867 0 --:--:-- --:--:-- --:--:-- 163k
[2019-12-23T19:40:01.872Z] ==> Validating source files with sha512sums...
[2019-12-23T19:40:01.872Z] python-pytest-mock-1.11.2.tar.gz ... Passed
[2019-12-23T19:40:07.066Z] ==> Making package: python-pytest-mock 1.11.2-1 (Mon 23 Dec 2019 07:40:06 PM UTC)
[2019-12-23T19:40:07.066Z] ==> Checking runtime dependencies...
[2019-12-23T19:40:07.066Z] ==> Checking buildtime dependencies...
[2019-12-23T19:40:07.066Z] ==> Installing missing dependencies...
[2019-12-23T19:40:07.066Z] resolving dependencies...
[2019-12-23T19:40:07.066Z] looking for conflicting packages...
[2019-12-23T19:40:07.066Z]
[2019-12-23T19:40:07.066Z] Package (47) New Version Net Change Download Size
[2019-12-23T19:40:07.066Z]
[2019-12-23T19:40:07.066Z] system/libnsl 1.2.0-2 0.19 MiB
[2019-12-23T19:40:07.066Z] world/python 3.8.0-1 151.60 MiB
[2019-12-23T19:40:07.066Z] galaxy/python-apipkg 1.5-3 0.02 MiB
[2019-12-23T19:40:07.066Z] world/python-appdirs 1.4.3-5 0.07 MiB
[2019-12-23T19:40:07.066Z] galaxy/python-atomicwrites 1.3.0-3 0.03 MiB
[2019-12-23T19:40:07.066Z] world/python-attrs 19.3.0-3 0.30 MiB
[2019-12-23T19:40:07.066Z] galaxy/python-importlib-metadata 0.23-2 0.16 MiB
[2019-12-23T19:40:07.066Z] galaxy/python-iniconfig 1.0.0-4 0.02 MiB
[2019-12-23T19:40:07.066Z] galaxy/python-more-itertools 8.0.2-1 0.23 MiB
[2019-12-23T19:40:07.066Z] world/python-ordered-set 3.1.1-1 0.05 MiB
[2019-12-23T19:40:07.066Z] world/python-packaging 19.2-5 0.14 MiB
[2019-12-23T19:40:07.067Z] galaxy/python-pluggy 0.13.1-1 0.12 MiB
[2019-12-23T19:40:07.067Z] galaxy/python-py 1.8.0-3 0.70 MiB
[2019-12-23T19:40:07.067Z] world/python-pyparsing 2.4.5-1 0.70 MiB
[2019-12-23T19:40:07.067Z] world/python-setuptools 1:42.0.2-1 1.54 MiB
[2019-12-23T19:40:07.067Z] world/python-six 1.13.0-2 0.09 MiB
[2019-12-23T19:40:07.067Z] galaxy/python-wcwidth 0.1.7-5 0.08 MiB
[2019-12-23T19:40:07.067Z] galaxy/python-zipp 0.6.0-3 0.02 MiB
[2019-12-23T19:40:07.067Z] world/python2 2.7.17-1 75.38 MiB
[2019-12-23T19:40:07.067Z] community/python2-apipkg 1.5-3 0.03 MiB
[2019-12-23T19:40:07.067Z] world/python2-appdirs 1.4.3-5 0.08 MiB
[2019-12-23T19:40:07.067Z] community/python2-atomicwrites 1.3.0-3 0.03 MiB
[2019-12-23T19:40:07.067Z] world/python2-attrs 19.3.0-3 0.33 MiB
[2019-12-23T19:40:07.067Z] extra/python2-backports 1.0-2 0.00 MiB
[2019-12-23T19:40:07.067Z] extra/python2-configparser 4.0.2-1 0.21 MiB
[2019-12-23T19:40:07.067Z] community/python2-contextlib2 0.6.0-3 0.06 MiB
[2019-12-23T19:40:07.067Z] community/python2-funcsigs 1.0.2-2 0.09 MiB
[2019-12-23T19:40:07.067Z] community/python2-importlib-metadata 0.23-2 0.18 MiB
[2019-12-23T19:40:07.067Z] community/python2-iniconfig 1.0.0-4 0.02 MiB
[2019-12-23T19:40:07.067Z] community/python2-more-itertools 5.0.0-1 0.48 MiB
[2019-12-23T19:40:07.067Z] world/python2-ordered-set 3.1.1-1 0.05 MiB
[2019-12-23T19:40:07.067Z] world/python2-packaging 19.2-5 0.15 MiB
[2019-12-23T19:40:07.067Z] community/python2-pathlib2 2.3.4-1 0.18 MiB
[2019-12-23T19:40:07.067Z] community/python2-pbr 5.4.4-1 0.72 MiB
[2019-12-23T19:40:07.067Z] community/python2-pluggy 0.13.1-1 0.13 MiB
[2019-12-23T19:40:07.067Z] community/python2-py 1.8.0-3 0.80 MiB
[2019-12-23T19:40:07.067Z] world/python2-pyparsing 2.4.5-1 0.76 MiB
[2019-12-23T19:40:07.067Z] community/python2-scandir 1.10.0-1 0.10 MiB
[2019-12-23T19:40:07.067Z] world/python2-setuptools 1:42.0.2-1 1.74 MiB
[2019-12-23T19:40:07.067Z] world/python2-six 1.13.0-2 0.10 MiB
[2019-12-23T19:40:07.067Z] community/python2-wcwidth 0.1.7-5 0.09 MiB
[2019-12-23T19:40:07.067Z] community/python2-zipp 0.6.0-3 0.02 MiB
[2019-12-23T19:40:07.067Z] galaxy/python-pytest 5.3.1-1 2.57 MiB
[2019-12-23T19:40:07.067Z] galaxy/python-setuptools-scm 3.3.3-3 0.09 MiB
[2019-12-23T19:40:07.067Z] community/python2-mock 3.0.5-3 0.24 MiB
[2019-12-23T19:40:07.067Z] community/python2-pytest 4.6.8-2 2.24 MiB 0.36 MiB
[2019-12-23T19:40:07.067Z] galaxy/python2-setuptools-scm 3.3.3-3 0.11 MiB
[2019-12-23T19:40:07.067Z]
[2019-12-23T19:40:07.067Z] Total Download Size: 0.36 MiB
[2019-12-23T19:40:07.067Z] Total Installed Size: 243.07 MiB
[2019-12-23T19:40:07.067Z]
[2019-12-23T19:40:07.067Z] :: Proceed with installation? [Y/n]
[2019-12-23T19:40:07.067Z] :: Retrieving packages...
[2019-12-23T19:40:07.067Z] downloading python2-pytest-4.6.8-2-any.pkg.tar.xz...
[2019-12-23T19:40:07.067Z] checking keyring...
[2019-12-23T19:40:07.067Z] checking package integrity...
[2019-12-23T19:40:08.928Z] loading package files...
[2019-12-23T19:40:08.928Z] checking for file conflicts...
[2019-12-23T19:40:08.928Z] checking available disk space...
[2019-12-23T19:40:08.928Z] :: Processing package changes...
[2019-12-23T19:40:08.928Z] installing libnsl...
[2019-12-23T19:40:08.928Z] installing python...
[2019-12-23T19:40:13.050Z] Optional dependencies for python
[2019-12-23T19:40:13.050Z] python-setuptools [pending]
[2019-12-23T19:40:13.050Z] python-pip
[2019-12-23T19:40:13.050Z] sqlite [installed]
[2019-12-23T19:40:13.050Z] mpdecimal: for decimal
[2019-12-23T19:40:13.050Z] xz: for lzma [installed]
[2019-12-23T19:40:13.050Z] tk: for tkinter
[2019-12-23T19:40:13.050Z] installing python-iniconfig...
[2019-12-23T19:40:13.050Z] installing python-apipkg...
[2019-12-23T19:40:13.050Z] installing python-py...
[2019-12-23T19:40:13.050Z] installing python-appdirs...
[2019-12-23T19:40:13.050Z] installing python-pyparsing...
[2019-12-23T19:40:13.050Z] installing python-six...
[2019-12-23T19:40:13.050Z] installing python-packaging...
[2019-12-23T19:40:13.050Z] installing python-ordered-set...
[2019-12-23T19:40:13.050Z] installing python-setuptools...
[2019-12-23T19:40:13.050Z] installing python-more-itertools...
[2019-12-23T19:40:13.050Z] installing python-zipp...
[2019-12-23T19:40:13.050Z] installing python-importlib-metadata...
[2019-12-23T19:40:13.050Z] installing python-pluggy...
[2019-12-23T19:40:13.050Z] installing python-attrs...
[2019-12-23T19:40:13.050Z] installing python-atomicwrites...
[2019-12-23T19:40:13.050Z] installing python-wcwidth...
[2019-12-23T19:40:13.050Z] installing python-pytest...
[2019-12-23T19:40:13.050Z] installing python2...
[2019-12-23T19:40:13.960Z] Optional dependencies for python2
[2019-12-23T19:40:13.960Z] tk: for IDLE
[2019-12-23T19:40:13.960Z] python2-setuptools [pending]
[2019-12-23T19:40:13.960Z] python2-pip
[2019-12-23T19:40:13.960Z] installing python2-iniconfig...
[2019-12-23T19:40:13.960Z] installing python2-apipkg...
[2019-12-23T19:40:13.960Z] installing python2-py...
[2019-12-23T19:40:13.960Z] installing python2-appdirs...
[2019-12-23T19:40:13.960Z] installing python2-pyparsing...
[2019-12-23T19:40:13.961Z] installing python2-six...
[2019-12-23T19:40:13.961Z] installing python2-packaging...
[2019-12-23T19:40:13.961Z] installing python2-ordered-set...
[2019-12-23T19:40:13.961Z] installing python2-setuptools...
[2019-12-23T19:40:13.961Z] installing python2-more-itertools...
[2019-12-23T19:40:13.961Z] installing python2-zipp...
[2019-12-23T19:40:13.961Z] installing python2-backports...
[2019-12-23T19:40:13.961Z] installing python2-configparser...
[2019-12-23T19:40:13.961Z] installing python2-contextlib2...
[2019-12-23T19:40:13.961Z] installing python2-scandir...
[2019-12-23T19:40:13.961Z] installing python2-pathlib2...
[2019-12-23T19:40:13.961Z] installing python2-importlib-metadata...
[2019-12-23T19:40:13.961Z] installing python2-pluggy...
[2019-12-23T19:40:13.961Z] installing python2-attrs...
[2019-12-23T19:40:13.961Z] installing python2-atomicwrites...
[2019-12-23T19:40:13.961Z] installing python2-wcwidth...
[2019-12-23T19:40:13.961Z] installing python2-funcsigs...
[2019-12-23T19:40:13.961Z] installing python2-pytest...
[2019-12-23T19:40:14.211Z] installing python2-pbr...
[2019-12-23T19:40:14.211Z] installing python2-mock...
[2019-12-23T19:40:14.211Z] installing python-setuptools-scm...
[2019-12-23T19:40:14.211Z] installing python2-setuptools-scm...
[2019-12-23T19:40:14.461Z] ==> Retrieving sources...
[2019-12-23T19:40:14.461Z] -> Found python-pytest-mock-1.11.2.tar.gz
[2019-12-23T19:40:14.461Z] ==> WARNING: Skipping all source file integrity checks.
[2019-12-23T19:40:14.461Z] ==> Extracting sources...
[2019-12-23T19:40:14.461Z] -> Extracting python-pytest-mock-1.11.2.tar.gz with bsdtar
[2019-12-23T19:40:14.461Z] ==> Starting prepare()...
[2019-12-23T19:40:14.461Z] ==> Starting build()...
[2019-12-23T19:40:14.711Z] running build
[2019-12-23T19:40:14.711Z] running build_py
[2019-12-23T19:40:14.711Z] creating build
[2019-12-23T19:40:14.711Z] creating build/lib
[2019-12-23T19:40:14.711Z] creating build/lib/pytest_mock
[2019-12-23T19:40:14.711Z] copying src/pytest_mock/_version.py -> build/lib/pytest_mock
[2019-12-23T19:40:14.711Z] copying src/pytest_mock/__init__.py -> build/lib/pytest_mock
[2019-12-23T19:40:14.711Z] copying src/pytest_mock/plugin.py -> build/lib/pytest_mock
[2019-12-23T19:40:15.262Z] running build
[2019-12-23T19:40:15.262Z] running build_py
[2019-12-23T19:40:15.262Z] creating build
[2019-12-23T19:40:15.262Z] creating build/lib
[2019-12-23T19:40:15.262Z] creating build/lib/pytest_mock
[2019-12-23T19:40:15.262Z] copying src/pytest_mock/_version.py -> build/lib/pytest_mock
[2019-12-23T19:40:15.262Z] copying src/pytest_mock/__init__.py -> build/lib/pytest_mock
[2019-12-23T19:40:15.262Z] copying src/pytest_mock/plugin.py -> build/lib/pytest_mock
[2019-12-23T19:40:15.262Z] ==> Starting check()...
[2019-12-23T19:40:15.262Z] running install
[2019-12-23T19:40:15.262Z] running build
[2019-12-23T19:40:15.262Z] running build_py
[2019-12-23T19:40:15.512Z] copying src/pytest_mock/_version.py -> build/lib/pytest_mock
[2019-12-23T19:40:15.512Z] running install_lib
[2019-12-23T19:40:15.512Z] creating /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install
[2019-12-23T19:40:15.512Z] creating /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr
[2019-12-23T19:40:15.512Z] creating /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib
[2019-12-23T19:40:15.512Z] creating /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8
[2019-12-23T19:40:15.512Z] creating /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages
[2019-12-23T19:40:15.512Z] creating /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock
[2019-12-23T19:40:15.512Z] copying build/lib/pytest_mock/_version.py -> /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock
[2019-12-23T19:40:15.512Z] copying build/lib/pytest_mock/__init__.py -> /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock
[2019-12-23T19:40:15.512Z] copying build/lib/pytest_mock/plugin.py -> /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock
[2019-12-23T19:40:15.512Z] byte-compiling /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock/_version.py to _version.cpython-38.pyc
[2019-12-23T19:40:15.512Z] byte-compiling /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock/__init__.py to __init__.cpython-38.pyc
[2019-12-23T19:40:15.512Z] byte-compiling /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock/plugin.py to plugin.cpython-38.pyc
[2019-12-23T19:40:15.512Z] writing byte-compilation script '/tmp/tmpidpkguaq.py'
[2019-12-23T19:40:15.512Z] /usr/bin/python /tmp/tmpidpkguaq.py
[2019-12-23T19:40:15.512Z] removing /tmp/tmpidpkguaq.py
[2019-12-23T19:40:15.512Z] running install_egg_info
[2019-12-23T19:40:15.512Z] running egg_info
[2019-12-23T19:40:15.512Z] creating src/pytest_mock.egg-info
[2019-12-23T19:40:15.512Z] writing src/pytest_mock.egg-info/PKG-INFO
[2019-12-23T19:40:15.512Z] writing dependency_links to src/pytest_mock.egg-info/dependency_links.txt
[2019-12-23T19:40:15.512Z] writing entry points to src/pytest_mock.egg-info/entry_points.txt
[2019-12-23T19:40:15.512Z] writing requirements to src/pytest_mock.egg-info/requires.txt
[2019-12-23T19:40:15.512Z] writing top-level names to src/pytest_mock.egg-info/top_level.txt
[2019-12-23T19:40:15.512Z] writing manifest file 'src/pytest_mock.egg-info/SOURCES.txt'
[2019-12-23T19:40:15.512Z] reading manifest file 'src/pytest_mock.egg-info/SOURCES.txt'
[2019-12-23T19:40:15.513Z] writing manifest file 'src/pytest_mock.egg-info/SOURCES.txt'
[2019-12-23T19:40:15.513Z] Copying src/pytest_mock.egg-info to /build/python-pytest-mock/src/pytest-mock-1.11.2/tmp_install/usr/lib/python3.8/site-packages/pytest_mock-1.11.2-py3.8.egg-info
[2019-12-23T19:40:15.513Z] running install_scripts
[2019-12-23T19:40:16.063Z] ============================= test session starts ==============================
[2019-12-23T19:40:16.063Z] platform linux -- Python 3.8.0, pytest-5.3.1, py-1.8.0, pluggy-0.13.1
[2019-12-23T19:40:16.063Z] rootdir: /build/python-pytest-mock/src/pytest-mock-1.11.2, inifile: tox.ini
[2019-12-23T19:40:16.063Z] plugins: mock-1.11.2
[2019-12-23T19:40:16.063Z] collected 53 items
[2019-12-23T19:40:16.063Z]
[2019-12-23T19:40:17.114Z] tests/test_pytest_mock.py ......................................FF...... [ 86%]
[2019-12-23T19:40:17.865Z] ..F.... [100%]
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] =================================== FAILURES ===================================
[2019-12-23T19:40:17.865Z] __________________ test_assert_called_args_with_introspection __________________
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] left = ('a', 1, {'test'}), right = ('b', 2, {'jest'})
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] @contextmanager
[2019-12-23T19:40:17.865Z] def assert_argument_introspection(left, right):
[2019-12-23T19:40:17.865Z] """
[2019-12-23T19:40:17.865Z] Assert detailed argument introspection is used
[2019-12-23T19:40:17.865Z] """
[2019-12-23T19:40:17.865Z] try:
[2019-12-23T19:40:17.865Z] > yield
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] tests/test_pytest_mock.py:410:
[2019-12-23T19:40:17.865Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] mocker = <pytest_mock.plugin.MockFixture object at 0x7f0326ff5460>
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] @pytest.mark.usefixtures("needs_assert_rewrite")
[2019-12-23T19:40:17.865Z] def test_assert_called_args_with_introspection(mocker):
[2019-12-23T19:40:17.865Z] stub = mocker.stub()
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] complex_args = ("a", 1, set(["test"]))
[2019-12-23T19:40:17.865Z] wrong_args = ("b", 2, set(["jest"]))
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] stub(*complex_args)
[2019-12-23T19:40:17.865Z] stub.assert_called_with(*complex_args)
[2019-12-23T19:40:17.865Z] stub.assert_called_once_with(*complex_args)
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] with assert_argument_introspection(complex_args, wrong_args):
[2019-12-23T19:40:17.865Z] > stub.assert_called_with(*wrong_args)
[2019-12-23T19:40:17.865Z]
[2019-12-23T19:40:17.865Z] tests/test_pytest_mock.py:488:
[2019-12-23T19:40:18.115Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] args = (<MagicMock spec='function' id='139651515896016'>, 'b', 2, {'jest'})
[2019-12-23T19:40:18.115Z] kwargs = {}, __tracebackhide__ = True
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] def wrap_assert_called_with(*args, **kwargs):
[2019-12-23T19:40:18.115Z] __tracebackhide__ = True
[2019-12-23T19:40:18.115Z] > assert_wrapper(_mock_module_originals["assert_called_with"], *args, **kwargs)
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] tmp_install/usr/lib/python3.8/site-packages/pytest_mock/plugin.py:253:
[2019-12-23T19:40:18.115Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] __wrapped_mock_method__ = <function NonCallableMock.assert_called_with at 0x7f03272e69d0>
[2019-12-23T19:40:18.115Z] args = (<MagicMock spec='function' id='139651515896016'>, 'b', 2, {'jest'})
[2019-12-23T19:40:18.115Z] kwargs = {}, __tracebackhide__ = True
[2019-12-23T19:40:18.115Z] e = AssertionError("expected call not found.\nExpected: mock('b', 2, {'jest'})\nActual: mock('a', 1, {'test'})\n\npytest introspection follows:\n\nArgs:\n")
[2019-12-23T19:40:18.115Z] msg = "expected call not found.\nExpected: mock('b', 2, {'jest'})\nActual: mock('a', 1, {'test'})\n\npytest introspection follows:\n\nArgs:\n"
[2019-12-23T19:40:18.115Z] __mock_self = <MagicMock spec='function' id='139651515896016'>
[2019-12-23T19:40:18.115Z] actual_args = ('a', 1, {'test'}), actual_kwargs = {}
[2019-12-23T19:40:18.115Z] introspection = '\nArgs:\n'
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] def assert_wrapper(__wrapped_mock_method__, *args, **kwargs):
[2019-12-23T19:40:18.115Z] __tracebackhide__ = True
[2019-12-23T19:40:18.115Z] try:
[2019-12-23T19:40:18.115Z] __wrapped_mock_method__(*args, **kwargs)
[2019-12-23T19:40:18.115Z] return
[2019-12-23T19:40:18.115Z] except AssertionError as e:
[2019-12-23T19:40:18.115Z] if getattr(e, "_mock_introspection_applied", 0):
[2019-12-23T19:40:18.115Z] msg = text_type(e)
[2019-12-23T19:40:18.115Z] else:
[2019-12-23T19:40:18.115Z] __mock_self = args[0]
[2019-12-23T19:40:18.115Z] msg = text_type(e)
[2019-12-23T19:40:18.115Z] if __mock_self.call_args is not None:
[2019-12-23T19:40:18.115Z] actual_args, actual_kwargs = __mock_self.call_args
[2019-12-23T19:40:18.115Z] introspection = ""
[2019-12-23T19:40:18.115Z] try:
[2019-12-23T19:40:18.115Z] assert actual_args == args[1:]
[2019-12-23T19:40:18.115Z] except AssertionError as e:
[2019-12-23T19:40:18.115Z] introspection += "\nArgs:\n" + text_type(e)
[2019-12-23T19:40:18.115Z] try:
[2019-12-23T19:40:18.115Z] assert actual_kwargs == kwargs
[2019-12-23T19:40:18.115Z] except AssertionError as e:
[2019-12-23T19:40:18.115Z] introspection += "\nKwargs:\n" + text_type(e)
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] if introspection:
[2019-12-23T19:40:18.115Z] msg += "\n\npytest introspection follows:\n" + introspection
[2019-12-23T19:40:18.115Z] e = AssertionError(msg)
[2019-12-23T19:40:18.115Z] e._mock_introspection_applied = True
[2019-12-23T19:40:18.115Z] > raise e
[2019-12-23T19:40:18.115Z] E AssertionError: expected call not found.
[2019-12-23T19:40:18.115Z] E Expected: mock('b', 2, {'jest'})
[2019-12-23T19:40:18.115Z] E Actual: mock('a', 1, {'test'})
[2019-12-23T19:40:18.115Z] E
[2019-12-23T19:40:18.115Z] E pytest introspection follows:
[2019-12-23T19:40:18.115Z] E
[2019-12-23T19:40:18.115Z] E Args:
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] tmp_install/usr/lib/python3.8/site-packages/pytest_mock/plugin.py:243: AssertionError
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] During handling of the above exception, another exception occurred:
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] mocker = <pytest_mock.plugin.MockFixture object at 0x7f0326ff5460>
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] @pytest.mark.usefixtures("needs_assert_rewrite")
[2019-12-23T19:40:18.115Z] def test_assert_called_args_with_introspection(mocker):
[2019-12-23T19:40:18.115Z] stub = mocker.stub()
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] complex_args = ("a", 1, set(["test"]))
[2019-12-23T19:40:18.115Z] wrong_args = ("b", 2, set(["jest"]))
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] stub(*complex_args)
[2019-12-23T19:40:18.115Z] stub.assert_called_with(*complex_args)
[2019-12-23T19:40:18.115Z] stub.assert_called_once_with(*complex_args)
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] with assert_argument_introspection(complex_args, wrong_args):
[2019-12-23T19:40:18.115Z] stub.assert_called_with(*wrong_args)
[2019-12-23T19:40:18.115Z] > stub.assert_called_once_with(*wrong_args)
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] tests/test_pytest_mock.py:489:
[2019-12-23T19:40:18.115Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.115Z] /usr/lib/python3.8/contextlib.py:131: in __exit__
[2019-12-23T19:40:18.115Z] self.gen.throw(type, value, traceback)
[2019-12-23T19:40:18.115Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] left = ('a', 1, {'test'}), right = ('b', 2, {'jest'})
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] @contextmanager
[2019-12-23T19:40:18.115Z] def assert_argument_introspection(left, right):
[2019-12-23T19:40:18.115Z] """
[2019-12-23T19:40:18.115Z] Assert detailed argument introspection is used
[2019-12-23T19:40:18.115Z] """
[2019-12-23T19:40:18.115Z] try:
[2019-12-23T19:40:18.115Z] yield
[2019-12-23T19:40:18.115Z] except AssertionError as e:
[2019-12-23T19:40:18.115Z] # this may be a bit too assuming, but seems nicer then hard-coding
[2019-12-23T19:40:18.115Z] import _pytest.assertion.util as util
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] # NOTE: we assert with either verbose or not, depending on how our own
[2019-12-23T19:40:18.115Z] # test was run by examining sys.argv
[2019-12-23T19:40:18.115Z] verbose = any(a.startswith("-v") for a in sys.argv)
[2019-12-23T19:40:18.115Z] expected = "\n ".join(util._compare_eq_iterable(left, right, verbose))
[2019-12-23T19:40:18.115Z] > assert expected in str(e)
[2019-12-23T19:40:18.115Z] E assert 'Use -v to get the full diff' in "expected call not found.\nExpected: mock('b', 2, {'jest'})\nActual: mock('a', 1, {'test'})\n\npytest introspection follows:\n\nArgs:\n"
[2019-12-23T19:40:18.115Z] E + where "expected call not found.\nExpected: mock('b', 2, {'jest'})\nActual: mock('a', 1, {'test'})\n\npytest introspection follows:\n\nArgs:\n" = str(AssertionError("expected call not found.\nExpected: mock('b', 2, {'jest'})\nActual: mock('a', 1, {'test'})\n\npytest introspection follows:\n\nArgs:\n"))
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.115Z] tests/test_pytest_mock.py:419: AssertionError
[2019-12-23T19:40:18.115Z] _________________ test_assert_called_kwargs_with_introspection _________________
[2019-12-23T19:40:18.115Z]
[2019-12-23T19:40:18.116Z] left = {'foo': {'bar': 1, 'baz': 'spam'}}
[2019-12-23T19:40:18.116Z] right = {'foo': {'baz': 'bran', 'goo': 1}}
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] @contextmanager
[2019-12-23T19:40:18.116Z] def assert_argument_introspection(left, right):
[2019-12-23T19:40:18.116Z] """
[2019-12-23T19:40:18.116Z] Assert detailed argument introspection is used
[2019-12-23T19:40:18.116Z] """
[2019-12-23T19:40:18.116Z] try:
[2019-12-23T19:40:18.116Z] > yield
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] tests/test_pytest_mock.py:410:
[2019-12-23T19:40:18.116Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] mocker = <pytest_mock.plugin.MockFixture object at 0x7f032702d550>
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] @pytest.mark.usefixtures("needs_assert_rewrite")
[2019-12-23T19:40:18.116Z] def test_assert_called_kwargs_with_introspection(mocker):
[2019-12-23T19:40:18.116Z] stub = mocker.stub()
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] complex_kwargs = dict(foo={"bar": 1, "baz": "spam"})
[2019-12-23T19:40:18.116Z] wrong_kwargs = dict(foo={"goo": 1, "baz": "bran"})
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] stub(**complex_kwargs)
[2019-12-23T19:40:18.116Z] stub.assert_called_with(**complex_kwargs)
[2019-12-23T19:40:18.116Z] stub.assert_called_once_with(**complex_kwargs)
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] with assert_argument_introspection(complex_kwargs, wrong_kwargs):
[2019-12-23T19:40:18.116Z] > stub.assert_called_with(**wrong_kwargs)
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] tests/test_pytest_mock.py:504:
[2019-12-23T19:40:18.116Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] args = (<MagicMock spec='function' id='139651516125392'>,)
[2019-12-23T19:40:18.116Z] kwargs = {'foo': {'baz': 'bran', 'goo': 1}}, __tracebackhide__ = True
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] def wrap_assert_called_with(*args, **kwargs):
[2019-12-23T19:40:18.116Z] __tracebackhide__ = True
[2019-12-23T19:40:18.116Z] > assert_wrapper(_mock_module_originals["assert_called_with"], *args, **kwargs)
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] tmp_install/usr/lib/python3.8/site-packages/pytest_mock/plugin.py:253:
[2019-12-23T19:40:18.116Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] __wrapped_mock_method__ = <function NonCallableMock.assert_called_with at 0x7f03272e69d0>
[2019-12-23T19:40:18.116Z] args = (<MagicMock spec='function' id='139651516125392'>,)
[2019-12-23T19:40:18.116Z] kwargs = {'foo': {'baz': 'bran', 'goo': 1}}, __tracebackhide__ = True
[2019-12-23T19:40:18.116Z] e = AssertionError("expected call not found.\nExpected: mock(foo={'goo': 1, 'baz': 'bran'})\nActual: mock(foo={'bar': 1, 'baz': 'spam'})\n\npytest introspection follows:\n\nKwargs:\n")
[2019-12-23T19:40:18.116Z] msg = "expected call not found.\nExpected: mock(foo={'goo': 1, 'baz': 'bran'})\nActual: mock(foo={'bar': 1, 'baz': 'spam'})\n\npytest introspection follows:\n\nKwargs:\n"
[2019-12-23T19:40:18.116Z] __mock_self = <MagicMock spec='function' id='139651516125392'>, actual_args = ()
[2019-12-23T19:40:18.116Z] actual_kwargs = {'foo': {'bar': 1, 'baz': 'spam'}}
[2019-12-23T19:40:18.116Z] introspection = '\nKwargs:\n'
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] def assert_wrapper(__wrapped_mock_method__, *args, **kwargs):
[2019-12-23T19:40:18.116Z] __tracebackhide__ = True
[2019-12-23T19:40:18.116Z] try:
[2019-12-23T19:40:18.116Z] __wrapped_mock_method__(*args, **kwargs)
[2019-12-23T19:40:18.116Z] return
[2019-12-23T19:40:18.116Z] except AssertionError as e:
[2019-12-23T19:40:18.116Z] if getattr(e, "_mock_introspection_applied", 0):
[2019-12-23T19:40:18.116Z] msg = text_type(e)
[2019-12-23T19:40:18.116Z] else:
[2019-12-23T19:40:18.116Z] __mock_self = args[0]
[2019-12-23T19:40:18.116Z] msg = text_type(e)
[2019-12-23T19:40:18.116Z] if __mock_self.call_args is not None:
[2019-12-23T19:40:18.116Z] actual_args, actual_kwargs = __mock_self.call_args
[2019-12-23T19:40:18.116Z] introspection = ""
[2019-12-23T19:40:18.116Z] try:
[2019-12-23T19:40:18.116Z] assert actual_args == args[1:]
[2019-12-23T19:40:18.116Z] except AssertionError as e:
[2019-12-23T19:40:18.116Z] introspection += "\nArgs:\n" + text_type(e)
[2019-12-23T19:40:18.116Z] try:
[2019-12-23T19:40:18.116Z] assert actual_kwargs == kwargs
[2019-12-23T19:40:18.116Z] except AssertionError as e:
[2019-12-23T19:40:18.116Z] introspection += "\nKwargs:\n" + text_type(e)
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] if introspection:
[2019-12-23T19:40:18.116Z] msg += "\n\npytest introspection follows:\n" + introspection
[2019-12-23T19:40:18.116Z] e = AssertionError(msg)
[2019-12-23T19:40:18.116Z] e._mock_introspection_applied = True
[2019-12-23T19:40:18.116Z] > raise e
[2019-12-23T19:40:18.116Z] E AssertionError: expected call not found.
[2019-12-23T19:40:18.116Z] E Expected: mock(foo={'goo': 1, 'baz': 'bran'})
[2019-12-23T19:40:18.116Z] E Actual: mock(foo={'bar': 1, 'baz': 'spam'})
[2019-12-23T19:40:18.116Z] E
[2019-12-23T19:40:18.116Z] E pytest introspection follows:
[2019-12-23T19:40:18.116Z] E
[2019-12-23T19:40:18.116Z] E Kwargs:
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] tmp_install/usr/lib/python3.8/site-packages/pytest_mock/plugin.py:243: AssertionError
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] During handling of the above exception, another exception occurred:
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] mocker = <pytest_mock.plugin.MockFixture object at 0x7f032702d550>
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] @pytest.mark.usefixtures("needs_assert_rewrite")
[2019-12-23T19:40:18.116Z] def test_assert_called_kwargs_with_introspection(mocker):
[2019-12-23T19:40:18.116Z] stub = mocker.stub()
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] complex_kwargs = dict(foo={"bar": 1, "baz": "spam"})
[2019-12-23T19:40:18.116Z] wrong_kwargs = dict(foo={"goo": 1, "baz": "bran"})
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] stub(**complex_kwargs)
[2019-12-23T19:40:18.116Z] stub.assert_called_with(**complex_kwargs)
[2019-12-23T19:40:18.116Z] stub.assert_called_once_with(**complex_kwargs)
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] with assert_argument_introspection(complex_kwargs, wrong_kwargs):
[2019-12-23T19:40:18.116Z] stub.assert_called_with(**wrong_kwargs)
[2019-12-23T19:40:18.116Z] > stub.assert_called_once_with(**wrong_kwargs)
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] tests/test_pytest_mock.py:505:
[2019-12-23T19:40:18.116Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.116Z] /usr/lib/python3.8/contextlib.py:131: in __exit__
[2019-12-23T19:40:18.116Z] self.gen.throw(type, value, traceback)
[2019-12-23T19:40:18.116Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] left = {'foo': {'bar': 1, 'baz': 'spam'}}
[2019-12-23T19:40:18.116Z] right = {'foo': {'baz': 'bran', 'goo': 1}}
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] @contextmanager
[2019-12-23T19:40:18.116Z] def assert_argument_introspection(left, right):
[2019-12-23T19:40:18.116Z] """
[2019-12-23T19:40:18.116Z] Assert detailed argument introspection is used
[2019-12-23T19:40:18.116Z] """
[2019-12-23T19:40:18.116Z] try:
[2019-12-23T19:40:18.116Z] yield
[2019-12-23T19:40:18.116Z] except AssertionError as e:
[2019-12-23T19:40:18.116Z] # this may be a bit too assuming, but seems nicer then hard-coding
[2019-12-23T19:40:18.116Z] import _pytest.assertion.util as util
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] # NOTE: we assert with either verbose or not, depending on how our own
[2019-12-23T19:40:18.116Z] # test was run by examining sys.argv
[2019-12-23T19:40:18.116Z] verbose = any(a.startswith("-v") for a in sys.argv)
[2019-12-23T19:40:18.116Z] expected = "\n ".join(util._compare_eq_iterable(left, right, verbose))
[2019-12-23T19:40:18.116Z] > assert expected in str(e)
[2019-12-23T19:40:18.116Z] E assert 'Use -v to get the full diff' in "expected call not found.\nExpected: mock(foo={'goo': 1, 'baz': 'bran'})\nActual: mock(foo={'bar': 1, 'baz': 'spam'})\n\npytest introspection follows:\n\nKwargs:\n"
[2019-12-23T19:40:18.116Z] E + where "expected call not found.\nExpected: mock(foo={'goo': 1, 'baz': 'bran'})\nActual: mock(foo={'bar': 1, 'baz': 'spam'})\n\npytest introspection follows:\n\nKwargs:\n" = str(AssertionError("expected call not found.\nExpected: mock(foo={'goo': 1, 'baz': 'bran'})\nActual: mock(foo={'bar': 1, 'baz': 'spam'})\n\npytest introspection follows:\n\nKwargs:\n"))
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] tests/test_pytest_mock.py:419: AssertionError
[2019-12-23T19:40:18.116Z] _________________________ test_detailed_introspection __________________________
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] testdir = <Testdir local('/tmp/pytest-of-builduser/pytest-0/test_detailed_introspection0')>
[2019-12-23T19:40:18.116Z]
[2019-12-23T19:40:18.116Z] @pytest.mark.usefixtures("needs_assert_rewrite")
[2019-12-23T19:40:18.116Z] def test_detailed_introspection(testdir):
[2019-12-23T19:40:18.116Z] """Check that the "mock_use_standalone" is being used.
[2019-12-23T19:40:18.116Z] """
[2019-12-23T19:40:18.116Z] testdir.makepyfile(
[2019-12-23T19:40:18.116Z] """
[2019-12-23T19:40:18.116Z] def test(mocker):
[2019-12-23T19:40:18.116Z] m = mocker.Mock()
[2019-12-23T19:40:18.116Z] m('fo')
[2019-12-23T19:40:18.116Z] m.assert_called_once_with('', bar=4)
[2019-12-23T19:40:18.116Z] """
[2019-12-23T19:40:18.116Z] )
[2019-12-23T19:40:18.116Z] result = testdir.runpytest("-s")
[2019-12-23T19:40:18.116Z] if NEW_FORMATTING:
[2019-12-23T19:40:18.116Z] expected_lines = [
[2019-12-23T19:40:18.116Z] "*AssertionError: expected call not found.",
[2019-12-23T19:40:18.116Z] "*Expected: mock('', bar=4)",
[2019-12-23T19:40:18.116Z] "*Actual: mock('fo')",
[2019-12-23T19:40:18.116Z] ]
[2019-12-23T19:40:18.116Z] else:
[2019-12-23T19:40:18.116Z] expected_lines = [
[2019-12-23T19:40:18.116Z] "*AssertionError: Expected call: mock('', bar=4)*",
[2019-12-23T19:40:18.116Z] "*Actual call: mock('fo')*",
[2019-12-23T19:40:18.116Z] ]
[2019-12-23T19:40:18.116Z] expected_lines += [
[2019-12-23T19:40:18.116Z] "*pytest introspection follows:*",
[2019-12-23T19:40:18.116Z] "*Args:",
[2019-12-23T19:40:18.116Z] "*assert ('fo',) == ('',)",
[2019-12-23T19:40:18.116Z] "*At index 0 diff: 'fo' != ''*",
[2019-12-23T19:40:18.116Z] "*Use -v to get the full diff*",
[2019-12-23T19:40:18.116Z] "*Kwargs:*",
[2019-12-23T19:40:18.116Z] "*assert {} == {'bar': 4}*",
[2019-12-23T19:40:18.116Z] "*Right contains* more item*",
[2019-12-23T19:40:18.116Z] "*{'bar': 4}*",
[2019-12-23T19:40:18.116Z] "*Use -v to get the full diff*",
[2019-12-23T19:40:18.116Z] ]
[2019-12-23T19:40:18.116Z] > result.stdout.fnmatch_lines(expected_lines)
[2019-12-23T19:40:18.116Z] E Failed: nomatch: '*AssertionError: expected call not found.'
[2019-12-23T19:40:18.116Z] E and: '============================= test session starts =============================='
[2019-12-23T19:40:18.116Z] E and: 'platform linux -- Python 3.8.0, pytest-5.3.1, py-1.8.0, pluggy-0.13.1'
[2019-12-23T19:40:18.116Z] E and: 'rootdir: /tmp/pytest-of-builduser/pytest-0/test_detailed_introspection0'
[2019-12-23T19:40:18.116Z] E and: 'plugins: mock-1.11.2'
[2019-12-23T19:40:18.116Z] E and: 'collected 1 item'
[2019-12-23T19:40:18.116Z] E and: ''
[2019-12-23T19:40:18.116Z] E and: 'test_detailed_introspection.py F'
[2019-12-23T19:40:18.116Z] E and: ''
[2019-12-23T19:40:18.116Z] E and: '=================================== FAILURES ==================================='
[2019-12-23T19:40:18.116Z] E and: '_____________________________________ test _____________________________________'
[2019-12-23T19:40:18.116Z] E and: ''
[2019-12-23T19:40:18.116Z] E and: 'mocker = <pytest_mock.plugin.MockFixture object at 0x7f0326e9f070>'
[2019-12-23T19:40:18.116Z] E and: ''
[2019-12-23T19:40:18.116Z] E and: ' def test(mocker):'
[2019-12-23T19:40:18.116Z] E and: ' m = mocker.Mock()'
[2019-12-23T19:40:18.116Z] E and: " m('fo')"
[2019-12-23T19:40:18.116Z] E and: "> m.assert_called_once_with('', bar=4)"
[2019-12-23T19:40:18.116Z] E fnmatch: '*AssertionError: expected call not found.'
[2019-12-23T19:40:18.116Z] E with: 'E AssertionError: expected call not found.'
[2019-12-23T19:40:18.116Z] E fnmatch: "*Expected: mock('', bar=4)"
[2019-12-23T19:40:18.116Z] E with: "E Expected: mock('', bar=4)"
[2019-12-23T19:40:18.116Z] E fnmatch: "*Actual: mock('fo')"
[2019-12-23T19:40:18.116Z] E with: "E Actual: mock('fo')"
[2019-12-23T19:40:18.116Z] E nomatch: '*pytest introspection follows:*'
[2019-12-23T19:40:18.116Z] E and: 'E '
[2019-12-23T19:40:18.116Z] E fnmatch: '*pytest introspection follows:*'
[2019-12-23T19:40:18.116Z] E with: 'E pytest introspection follows:'
[2019-12-23T19:40:18.116Z] E nomatch: '*Args:'
[2019-12-23T19:40:18.116Z] E and: 'E '
[2019-12-23T19:40:18.116Z] E fnmatch: '*Args:'
[2019-12-23T19:40:18.116Z] E with: 'E Args:'
[2019-12-23T19:40:18.117Z] E nomatch: "*assert ('fo',) == ('',)"
[2019-12-23T19:40:18.117Z] E and: 'E '
[2019-12-23T19:40:18.117Z] E and: 'E Kwargs:'
[2019-12-23T19:40:18.117Z] E and: ''
[2019-12-23T19:40:18.117Z] E and: 'test_detailed_introspection.py:4: AssertionError'
[2019-12-23T19:40:18.117Z] E and: '============================== 1 failed in 0.01s ==============================='
[2019-12-23T19:40:18.117Z] E remains unmatched: "*assert ('fo',) == ('',)"
[2019-12-23T19:40:18.117Z]
[2019-12-23T19:40:18.117Z] /build/python-pytest-mock/src/pytest-mock-1.11.2/tests/test_pytest_mock.py:679: Failed
[2019-12-23T19:40:18.117Z] ----------------------------- Captured stdout call -----------------------------
[2019-12-23T19:40:18.117Z] ============================= test session starts ==============================
[2019-12-23T19:40:18.117Z] platform linux -- Python 3.8.0, pytest-5.3.1, py-1.8.0, pluggy-0.13.1
[2019-12-23T19:40:18.117Z] rootdir: /tmp/pytest-of-builduser/pytest-0/test_detailed_introspection0
[2019-12-23T19:40:18.117Z] plugins: mock-1.11.2
[2019-12-23T19:40:18.117Z] collected 1 item
[2019-12-23T19:40:18.117Z]
[2019-12-23T19:40:18.117Z] test_detailed_introspection.py F
[2019-12-23T19:40:18.117Z]
[2019-12-23T19:40:18.117Z] =================================== FAILURES ===================================
[2019-12-23T19:40:18.117Z] _____________________________________ test _____________________________________
[2019-12-23T19:40:18.117Z]
[2019-12-23T19:40:18.117Z] mocker = <pytest_mock.plugin.MockFixture object at 0x7f0326e9f070>
[2019-12-23T19:40:18.117Z]
[2019-12-23T19:40:18.117Z] def test(mocker):
[2019-12-23T19:40:18.117Z] m = mocker.Mock()
[2019-12-23T19:40:18.117Z] m('fo')
[2019-12-23T19:40:18.117Z] > m.assert_called_once_with('', bar=4)
[2019-12-23T19:40:18.117Z] E AssertionError: expected call not found.
[2019-12-23T19:40:18.117Z] E Expected: mock('', bar=4)
[2019-12-23T19:40:18.117Z] E Actual: mock('fo')
[2019-12-23T19:40:18.117Z] E
[2019-12-23T19:40:18.117Z] E pytest introspection follows:
[2019-12-23T19:40:18.117Z] E
[2019-12-23T19:40:18.117Z] E Args:
[2019-12-23T19:40:18.117Z] E
[2019-12-23T19:40:18.117Z] E Kwargs:
[2019-12-23T19:40:18.117Z]
[2019-12-23T19:40:18.117Z] test_detailed_introspection.py:4: AssertionError
[2019-12-23T19:40:18.117Z] ============================== 1 failed in 0.01s ===============================
[2019-12-23T19:40:18.117Z] =========================== short test summary info ============================
[2019-12-23T19:40:18.117Z] FAILED tests/test_pytest_mock.py::test_assert_called_args_with_introspection
[2019-12-23T19:40:18.117Z] FAILED tests/test_pytest_mock.py::test_assert_called_kwargs_with_introspection
[2019-12-23T19:40:18.117Z] FAILED tests/test_pytest_mock.py::test_detailed_introspection - Failed: nomat...
[2019-12-23T19:40:18.117Z] ========================= 3 failed, 50 passed in 2.11s =========================
[2019-12-23T19:40:18.117Z] ==> ERROR: A failure occurred in check().
[2019-12-23T19:40:18.117Z] Aborting...
[2019-12-23T19:40:18.667Z] ==> ERROR: Build failed, check /build/buildpkg/default-x86_64/jenkins/build
[Pipeline] }
[Pipeline] // dir
Post stage
[Pipeline] emailext
[2019-12-23T19:40:18.762Z] Sending email to: artix-build-failures at artixlinux.org
More information about the artix-build-failures
mailing list