@@ -0,0 +1,1839 @@
+import unittest%0A%0Aimport ModernGL%0A%0A%0Aclass TestCase(unittest.TestCase):%0A%0A    @classmethod%0A    def setUpClass(cls):%0A        cls.ctx = ModernGL.create_standalone_context()%0A%0A    def tearDown(self):%0A        self.assertEqual(self.ctx.error, 'GL_NO_ERROR')%0A%0A    @classmethod%0A    def tearDownClass(cls):%0A        cls.ctx.release()%0A%0A    def test_buffer_repr(self):%0A        buf = self.ctx.buffer(reserve=1024)%0A        self.assertRegex(repr(buf), r'%3CBuffer: %5Cd+%3E')%0A%0A    def test_compute_shader_repr(self):%0A        if self.ctx.version_code %3C 430:%0A            self.skipTest('OpenGL 4.3 is not supported')%0A%0A        compute_shader = self.ctx.compute_shader('''%0A            #version 430%0A            layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;%0A            void main() %7B%0A            %7D%0A        ''')%0A%0A        self.assertRegex(repr(compute_shader), r'%3CComputeShader: %5Cd+%3E')%0A%0A    def test_renderbuffer_and_framebuffer_repr(self):%0A        rbo = self.ctx.renderbuffer((16, 16))%0A        self.assertRegex(repr(rbo), r'%3CRenderbuffer: %5Cd+%3E')%0A%0A        with self.subTest(rbo=rbo):%0A            fbo = self.ctx.framebuffer(rbo)%0A            self.assertRegex(repr(fbo), r'%3CFramebuffer: %5Cd+%3E')%0A%0A    def test_shader_and_program_repr(self):%0A        vertex_shader = self.ctx.vertex_shader('''%0A            #version 330%0A            in vec4 vertex;%0A            void main() %7B%0A                gl_Position = vertex;%0A            %7D%0A        ''')%0A%0A        self.assertRegex(repr(vertex_shader), r'%3CShader: %5Cd+%3E')%0A%0A        with self.subTest(vertex_shader=vertex_shader):%0A            prog = self.ctx.program(vertex_shader)%0A            self.assertRegex(repr(prog), r'%3CProgram: %5Cd+%3E')%0A%0A    def test_texture_repr(self):%0A        texture = self.ctx.texture((4, 4), 3)%0A        self.assertRegex(repr(texture), r'%3CTexture: %5Cd+%3E')%0A%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

test __repr__