archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pytest-mock / repos / community-any / PKGBUILD
blobe486d44f4a9508dd7e4b978246d31885be810e33
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-pytest-mock
4 pkgver=3.10.0
5 _commit=6c03dfd4240de4a178bab67c0a32fba28d8bcf91
6 pkgrel=3
7 pkgdesc="Thin-wrapper around the mock package for easier use with py.test"
8 arch=('any')
9 license=('LGPL3')
10 url="https://github.com/pytest-dev/pytest-mock/"
11 depends=('python-pytest')
12 makedepends=('git' 'python-setuptools-scm')
13 checkdepends=('python-pytest-asyncio')
14 source=("git+https://github.com/pytest-dev/pytest-mock.git#commit=$_commit")
15 sha512sums=('SKIP')
17 build() {
18   cd pytest-mock
19   python setup.py build
22 check() {
23   cd pytest-mock
24   python setup.py egg_info
25   export PYTHONPATH="src:${PYTHONPATH}"
26   # disable all tests that require the plugin to be installed
27   pytest -v --assert=plain \
28     -k "not test_used_with_session_scope \
29         and not test_used_with_package_scope \
30         and not test_used_with_module_scope \
31         and not test_used_with_class_scope \
32         and not test_monkeypatch_ini \
33         and not test_monkeypatch_native \
34         and not test_standalone_mock \
35         and not test_plain_stopall"
38 package() {
39   cd pytest-mock
40   python setup.py install --root="$pkgdir" --optimize=1