Commits

Paul Morelle committed a015cd1

Use virtual=true parameter for tests when initializing Soya

Comments (0)

Files changed (4)

soya/test/unittest_geom.py

 soya.path.append(os.path.join(os.path.dirname(__file__), "data"))
 from unittest import TestCase, main as unittest_main
 
-soya.init("geom test case", width=1024, height=768, quiet=True)
+soya.init("geom test case", width=1024, height=768, quiet=True, virtual=True)
 
 class GeomTestCase(TestCase):
 

soya/test/unittest_gravity.py

 from soya import Vector
 soya.path.append(os.path.join(os.path.dirname(__file__), "data"))
 from unittest import TestCase, main as unittest_main
-soya.init("gravity test case", width=1024, height=768, quiet=True)
+soya.init("gravity test case", width=1024, height=768, quiet=True, virtual=True)
 
 class GravityTestCase(TestCase):
 

soya/test/unittest_init.py

 	def test_quiet(self):
 		if soya.inited:
 			self.skip('Soya is already initialised')
-		soya.init("test quiet init", quiet=True)
+		soya.init("test quiet init", quiet=True, virtual=True)
 		self.assertEqual(self.stdout.getvalue(), '')
 		self.assertEqual(self.stderr.getvalue(), '')
 
 	def test_verbose(self):
 		if soya.inited:
 			self.skip('Soya is already initialised')
-		soya.init("test verbose init", quiet=False)
+		soya.init("test verbose init", quiet=False, virtual=True)
 		self.assertNotEqual(self.stdout.getvalue(), '')
 		self.assertEqual(self.stderr.getvalue(), '')
 
 	def test_default(self):
 		if soya.inited:
 			self.skip('Soya is already initialised')
-		soya.init("test default init")
+		soya.init("test default init", virtual=True)
 		self.assertNotEqual(self.stdout.getvalue(), '')
 		self.assertEqual(self.stderr.getvalue(), '')
 
 	def test_default_with_args(self):
 		if soya.inited:
 			self.skip('Soya is already initialised')
-		soya.init("test default init", width=640, height=480)
+		soya.init("test default init with args", width=640, height=480, virtual=True)
 		self.assertNotEqual(self.stdout.getvalue(), '')
 		self.assertEqual(self.stderr.getvalue(), '')
 
 	pre_build = True
 
 	def setUp(self):
-		soya.init("Soya Test", width=640, height=480, quiet=True)
+		soya.init("Soya Test", width=640, height=480, quiet=True, virtual=True)
 		if self.pre_build:
 			self.setup_scene()