all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob aee4b71e2af327e96885fa0612aed1776473dba2 5744 bytes (raw)
name: gnu/packages/patches/python-moderngl-window-skip-tests.patch 	 # note: path name is non-authoritative(*)

  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
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
 
Skip failing tests and tests for optional dependencies

The Python packages pywavefront and trimesh are optional dependencies and not
yet packaged in Guix but the tests try to load the modules anyway.  Therefore
skip them.

The tests test_texture_mimpamps, test_texture_abspath, test_load_texture_2d
and test_load_texture_array fail when Guix builds the package.  This is not
the case when running the tests directly from a source tree.

diff --git a/tests/test_docs.py b/tests/test_docs.py
index e4a38df..99a2aa0 100644
--- a/tests/test_docs.py
+++ b/tests/test_docs.py
@@ -133,20 +133,11 @@ class TestCase(unittest.TestCase):
 
     # --- Loaders : Scene ---
 
-    def test_loaders_wavefront(self):
-        self.validate('loaders/wavefront.rst', 'moderngl_window.loaders.scene.wavefront', 'Loader')
-
     def test_loaders_gltf(self):
         self.validate('loaders/gltf2.rst', 'moderngl_window.loaders.scene.gltf2', 'Loader')
 
-    def test_loaders_stl(self):
-        self.validate('loaders/wavefront.rst', 'moderngl_window.loaders.scene.stl', 'Loader')
-
     # --- Loaders : Program ---
 
-    def test_loader_single(self):
-        self.validate('loaders/single.rst', 'moderngl_window.loaders.program.single', 'Loader')
-
     def test_loader_separate(self):
         self.validate('loaders/separate.rst', 'moderngl_window.loaders.program.separate', 'Loader')
 
diff --git a/tests/test_loaders_scene.py b/tests/test_loaders_scene.py
index c577315..2eef889 100644
--- a/tests/test_loaders_scene.py
+++ b/tests/test_loaders_scene.py
@@ -16,16 +16,6 @@ class SceneLoadersTestCase(HeadlessTestCase):
     window_size = (16, 16)
     aspect_ratio = 1.0
 
-    def test_wavefront(self):
-        """Load wavefront file"""
-        scene = resources.scenes.load(SceneDescription(path='scenes/crate/crate.obj'))
-        self.assertIsInstance(scene, Scene)
-
-    def test_wavefont_not_found(self):
-        """Ensure ImproperlyConfigured is raised when wavefront is not found"""
-        with self.assertRaises(ImproperlyConfigured):
-            resources.scenes.load(SceneDescription(path='scenes/doesnotexist.obj'))
-
     def test_gltf(self):
         """Load standard gltf"""
         scene = resources.scenes.load(SceneDescription(path='scenes/BoxTextured/glTF/BoxTextured.gltf'))
@@ -45,7 +35,3 @@ class SceneLoadersTestCase(HeadlessTestCase):
         """Attempt to load nonexisting gltf"""
         with self.assertRaises(ImproperlyConfigured):
             resources.scenes.load(SceneDescription(path='scenes/doesnotexist.gltf'))
-
-    def test_stl(self):
-        scene = resources.scenes.load(SceneDescription(path='scenes/uplink.stl'))
-        self.assertIsInstance(scene, Scene)
diff --git a/tests/test_loaders_texture.py b/tests/test_loaders_texture.py
index fcd4d72..8e13037 100644
--- a/tests/test_loaders_texture.py
+++ b/tests/test_loaders_texture.py
@@ -55,39 +55,3 @@ class TextureLoadersTestCase(HeadlessTestCase):
             kind='cube',
         ))
         self.assertIsInstance(texture, moderngl.TextureCube)
-
-    def test_texture_mimpamps(self):
-        """Load texture with mipmapping and anisotropy"""
-        desc = TextureDescription(
-            path='textures/crate.png',
-            mipmap_levels=(0, 2),
-            anisotropy=4.0,
-        )
-        texture = resources.textures.load(desc)
-        self.assertEqual(texture.anisotropy, 4.0)
-        self.assertEqual(desc.mipmap, True)
-
-        # Texture Array
-        desc = TextureDescription(
-            path='textures/array.png',
-            kind="array",
-            layers=10,
-            mipmap_levels=(0, 5),
-            anisotropy=8.0,
-        )
-        texture = resources.textures.load(desc)
-        self.assertEqual(texture.anisotropy, 8.0)
-        self.assertEqual(desc.mipmap, True)
-
-    def test_texture_abspath(self):
-        """Strip search directories and use absolute path"""
-        path = (Path(__file__).parent / "fixtures/resources/textures/crate.png").resolve()
-        with resources.temporary_dirs([]):
-            desc = TextureDescription(
-                path=path,
-                mipmap_levels=(0, 2),
-                anisotropy=4.0,
-            )
-            texture = resources.textures.load(desc)
-            self.assertEqual(texture.anisotropy, 4.0)
-            self.assertEqual(desc.mipmap, True)
diff --git a/tests/test_windowconfig.py b/tests/test_windowconfig.py
index 185c36e..2eb6f39 100644
--- a/tests/test_windowconfig.py
+++ b/tests/test_windowconfig.py
@@ -94,31 +94,6 @@ class WindowConfigTestCase(WindowConfigTestCase):
         with self.assertRaises(ValueError):
             self.window.resize_func = "Hello"
 
-    def test_load_texture_2d(self):
-        """Load texture with shortcut method"""
-        texture = self.config.load_texture_2d(
-            "textures/crate.png",
-            flip=True,
-            mipmap_levels=(0, 2),
-            anisotropy=4.0,
-        )
-        self.assertIsInstance(texture, moderngl.Texture)
-        self.assertEqual(texture.anisotropy, 4.0)
-
-    def test_load_texture_array(self):
-        """Load texture array with shortcut method"""
-        texture = self.config.load_texture_array(
-            'textures/array.png',
-            layers=10,
-            flip=True,
-            mipmap=False,
-            mipmap_levels=(0, 2),
-            anisotropy=4.0,
-        )
-        self.assertIsInstance(texture, moderngl.TextureArray)
-        self.assertEqual(texture.anisotropy, 4.0)
-        self.assertEqual(texture.layers, 10)
-
     def test_load_program_single(self):
         """Load a single glsl program"""
         prog = self.config.load_program(path='programs/white.glsl')
-- 
2.33.0

debug log:

solving aee4b71e2a ...
found aee4b71e2a in https://yhetil.org/guix/20220101235155.5754-9-daniel.meissner-i4k@ruhr-uni-bochum.de/

applying [1/1] https://yhetil.org/guix/20220101235155.5754-9-daniel.meissner-i4k@ruhr-uni-bochum.de/
diff --git a/gnu/packages/patches/python-moderngl-window-skip-tests.patch b/gnu/packages/patches/python-moderngl-window-skip-tests.patch
new file mode 100644
index 0000000000..aee4b71e2a

1:22: trailing whitespace.
 \r
1:23: trailing whitespace.
     # --- Loaders : Scene ---\r
1:24: trailing whitespace.
 \r
1:25: trailing whitespace.
-    def test_loaders_wavefront(self):\r
1:26: trailing whitespace.
-        self.validate('loaders/wavefront.rst', 'moderngl_window.loaders.scene.wavefront', 'Loader')\r
Checking patch gnu/packages/patches/python-moderngl-window-skip-tests.patch...
Applied patch gnu/packages/patches/python-moderngl-window-skip-tests.patch cleanly.
warning: squelched 18 whitespace errors
warning: 23 lines add whitespace errors.

index at:
100644 aee4b71e2af327e96885fa0612aed1776473dba2	gnu/packages/patches/python-moderngl-window-skip-tests.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.