tests: Fix gio-tool.py test on macOS

Content types are different on macOS.

This fixes commit 9028c9bdf.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3158
This commit is contained in:
Philip Withnall 2023-11-08 10:29:43 +00:00
parent 85d93fb581
commit d59bac3f32

View File

@ -27,6 +27,7 @@ import collections
import os import os
import shutil import shutil
import subprocess import subprocess
import sys
import tempfile import tempfile
import unittest import unittest
@ -125,7 +126,12 @@ class TestGioTool(unittest.TestCase):
result = self.runGio( result = self.runGio(
"info", "--attributes=standard::content-type", tmpfile.name "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__": if __name__ == "__main__":