From d59bac3f324ffbe11b1b8d53ea466474a47970fe Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 8 Nov 2023 10:29:43 +0000 Subject: [PATCH] tests: Fix gio-tool.py test on macOS Content types are different on macOS. This fixes commit 9028c9bdf. Signed-off-by: Philip Withnall Helps: #3158 --- gio/tests/gio-tool.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gio/tests/gio-tool.py b/gio/tests/gio-tool.py index 593ac9767..1a030dfb9 100644 --- a/gio/tests/gio-tool.py +++ b/gio/tests/gio-tool.py @@ -27,6 +27,7 @@ import collections import os import shutil import subprocess +import sys import tempfile import unittest @@ -125,7 +126,12 @@ class TestGioTool(unittest.TestCase): result = self.runGio( "info", "--attributes=standard::content-type", tmpfile.name ) - self.assertIn("standard::content-type: application/x-zerosize", result.out) + if sys.platform == "darwin": + self.assertIn("standard::content-type: public.text", result.out) + else: + self.assertIn( + "standard::content-type: application/x-zerosize", result.out + ) if __name__ == "__main__":