Package Details: python-pytest-subprocess 1.5.2-1

Git Clone URL: https://aur.archlinux.org/python-pytest-subprocess.git (read-only, click to copy)
Package Base: python-pytest-subprocess
Description: Pytest plugin to fake subprocess
Upstream URL: https://github.com/aklajnert/pytest-subprocess
Licenses: MIT
Submitter: bcb
Maintainer: bcb
Last Packager: bcb
Votes: 0
Popularity: 0.000000
First Submitted: 2023-06-10 11:33 (UTC)
Last Updated: 2024-07-24 12:39 (UTC)

Latest Comments

gesh commented on 2024-07-02 15:08 (UTC)

I also needed PR117 in order for the tests to succeed, and needed to remove the site_packages code in check(). I ended up also just pulling the repo state when PR142 was merged instead of cherry-picking the necessary commits -- the resulting state is clearer that way IMO. A patch fixing the above issues:

diff --git a/PKGBUILD b/PKGBUILD
index d32df14..e9fafee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,8 @@
 pkgname=python-pytest-subprocess
 pkgdesc='Pytest plugin to fake subprocess'
 url='https://github.com/aklajnert/pytest-subprocess'
-pkgver=1.5.0
-pkgrel=2
+pkgver=1.5.0.r24.g5572283
+pkgrel=1
 arch=('any')
 license=('MIT')

@@ -19,35 +19,27 @@ checkdepends=(
 )

 _pkgname=pytest-subprocess
-source=(
-  "$_pkgname-$pkgver.tar.gz::https://github.com/aklajnert/pytest-subprocess/archive/refs/tags/$pkgver.tar.gz"
-  'github-pr142.patch::https://patch-diff.githubusercontent.com/raw/aklajnert/pytest-subprocess/pull/148.patch'
-)
-sha256sums=(
-  '80172ac95439cd4a237c5ee7f343227a7fd21fb61284bfa0de4b7802502d88dc'
-  '694663a0ebc7db59c1c281984b583e78d8d63c35a616b2d7141f1ea733361b6c'
-)
+_commit=55722833ca12ea90645f0020cda44efc2d8e5798
+source=("$_pkgname::git+$url#commit=$_commit")
+sha256sums=('21b7b55b2054872b77f6f14881f20850e0b23a811e843b166b021fcb97a64d81')

-prepare() {
-  cd "$_pkgname-$pkgver"
-  git apply "$srcdir/github-pr142.patch"
+pkgver() {
+  cd "$_pkgname"
+  git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
 }

 build() {
-  cd "$_pkgname-$pkgver"
+  cd "$_pkgname"
   python -m build --wheel --no-isolation
 }

 check() {
-  cd "$_pkgname-$pkgver"
-  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
-  python -m installer --destdir=test_dir dist/pytest_subprocess-"$pkgver"-*.whl
-  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
-  pytest
+  cd "$_pkgname"
+  python -m pytest
 }

 package() {
-  cd "$_pkgname-$pkgver"
-  python -m installer --destdir="$pkgdir" dist/pytest_subprocess-"$pkgver"-*.whl
+  cd "$_pkgname"
+  python -m installer --destdir="$pkgdir" dist/pytest_subprocess-*.whl
   install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
 }

bloeher commented on 2024-04-11 05:20 (UTC)

I'm getting the same error as well.

evamvid commented on 2024-04-10 07:39 (UTC)

Hi, I get the same error as @A_Bart even with the patch applied -- pluggy.PluggyTeardownRaisedWarning and DeprecationWarning on tests/test_asyncio.py. I can put the full output in a pastebin if it's helpful.

bcb commented on 2024-03-31 16:42 (UTC)

@A_Bart - sorry for the delay. This has been fixed upstream but the fix is not yet in a release. I have pushed a new -2 package which applies the patch from the pull request so the tests pass for me now.

A_Bart commented on 2024-01-30 08:14 (UTC)

Hello, the package fails to build, the error is in the check step, the test that fails is tests/test_asyncio.py, due to numerous DeprecationWarning and pluggy.PluggyTeardownRaisedWarning