File: skip-test-when-image-lacks-arch.patch

package info (click to toggle)
python-podman 5.4.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,140 kB
  • sloc: python: 7,532; makefile: 82; sh: 75
file content (25 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: skip tests when the test image is not available (e.g. 32-bit)
Forwarded: https://github.com/containers/podman-py/pull/524
--- a/podman/tests/integration/test_images.py
+++ b/podman/tests/integration/test_images.py
@@ -16,6 +16,7 @@
 
 import io
 import os
+import platform
 import tarfile
 import types
 import unittest
@@ -146,10 +147,12 @@
         self.assertIsNotNone(image)
         self.assertIsNotNone(image.id)
 
+    @unittest.skipIf(platform.architecture()[0] == "32bit", "no 32-bit image available")
     def test_pull_stream(self):
         generator = self.client.images.pull("ubi8", tag="latest", stream=True)
         self.assertIsInstance(generator, types.GeneratorType)
 
+    @unittest.skipIf(platform.architecture()[0] == "32bit", "no 32-bit image available")
     def test_pull_stream_decode(self):
         generator = self.client.images.pull("ubi8", tag="latest", stream=True, decode=True)
         self.assertIsInstance(generator, types.GeneratorType)