Merge pull request #335708 from eclairevoyant/xdp-trash

xdg-desktop-portal: disable bad test
This commit is contained in:
Aleksana 2024-08-21 18:22:39 +08:00 committed by GitHub
commit 38e287d507
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View File

@ -60,6 +60,9 @@ stdenv.mkDerivation (finalAttrs: {
# While upstream has `XDG_DESKTOP_PORTAL_DIR`, it is meant for tests and actually blocks
# any configs from being loaded from anywhere else.
./nix-pkgdatadir-env.patch
# test tries to read /proc/cmdline, which is not intended to be accessible in the sandbox
./trash-test.patch
];
nativeBuildInputs = [

View File

@ -0,0 +1,18 @@
diff --git a/tests/test_trash.py b/tests/test_trash.py
index d745cd2..173e3e5 100644
--- a/tests/test_trash.py
+++ b/tests/test_trash.py
@@ -24,13 +24,6 @@ class TestTrash:
def test_version(self, portal_mock):
portal_mock.check_version(1)
- def test_trash_file_fails(self, portal_mock):
- trash_intf = portal_mock.get_dbus_interface()
- with open("/proc/cmdline") as fd:
- result = trash_intf.TrashFile(fd.fileno())
-
- assert result == 0
-
def test_trash_file(self, portal_mock):
trash_intf = portal_mock.get_dbus_interface()