Exemple #1
0
 def setUp(self):
     self.path = os.path.join(layoutPath, layoutFile)
     self.layout = Layout.createFromExisting(self.path)
     self.layoutserver = LayoutServer.createFromExisting(
         self.path, "Test Server", 10030)
     self.layoutserver.run()
     self.conn = httplib.HTTPConnection("localhost:10030")
Exemple #2
0
 def setUp(self):
     self.name = rospy.get_param('~name', 'OSC Server')
     self.port = int(rospy.get_param('~port', '9658'))
     self.file = rospy.get_param('~layout_file',
                                 rospy.get_param('layout_file', None))
     self.layout = Layout.createFromExisting(self.file)
     self.clients = {}
 def setUp(self):
     self.path = os.path.join(layoutPath, layoutFile)
     self.layout = Layout.createFromExisting(self.path)
     self.layoutserver = LayoutServer.createFromExisting(self.path,
                                      "Test Server",
                                      10030)
     self.layoutserver.run()
     self.conn = httplib.HTTPConnection("localhost:10030")
Exemple #4
0
    def setUp(self):
        self.layoutFile = layoutFile
        self.layoutPath = layoutPath
        self.layoutJoinPath = os.path.join(self.layoutPath, self.layoutFile)

        self.layout = Layout.createFromExisting(self.layoutJoinPath)

        self.testFile = 'test'
        self.testFileExt = 'test.touchosc'
        self.testPath = layoutPath
        self.testJoinPath = os.path.join(self.testPath, self.testFileExt)
Exemple #5
0
    def setUp(self):
        self.layoutFile = layoutFile
        self.layoutPath = layoutPath
        self.layoutJoinPath = os.path.join(self.layoutPath, self.layoutFile)

        self.layout = Layout.createFromExisting(self.layoutJoinPath)

        self.testFile = 'test'
        self.testFileExt = 'test.touchosc'
        self.testPath = layoutPath
        self.testJoinPath = os.path.join(self.testPath, self.testFileExt)
 def setUp(self):
     self.name = rospy.get_param('~name', 'OSC Server')
     self.port = int(rospy.get_param('~port', '9658'))
     self.file = rospy.get_param('~layout_file', rospy.get_param('layout_file', None))  
     self.layout = Layout.createFromExisting(self.file)
     self.clients = {}
 def setUp(self):
     self.path = os.path.join(layoutPath, layoutFile)
     self.layout = Layout.createFromExisting(self.path)
Exemple #8
0
 def setUp(self):
     self.path = os.path.join(layoutPath, layoutFile)
     self.layout = Layout.createFromExisting(self.path)
Exemple #9
0
import unittest
import os
import sys

sys.path.append(os.path.abspath('../src'))

import pytouchosc.utilities
from pytouchosc.layout import Layout

layout_path = os.path.abspath('./layouts')

layout_ipod_h = Layout.createFromExisting(os.path.join(layout_path, 'test_ipod_h.touchosc'))
layout_ipod_v = Layout.createFromExisting(os.path.join(layout_path, 'test_ipod_v.touchosc'))
layout_ipad_h = Layout.createFromExisting(os.path.join(layout_path, 'test_ipad_h.touchosc'))
layout_ipad_v = Layout.createFromExisting(os.path.join(layout_path, 'test_ipad_v.touchosc'))
layout_five_tabpages = Layout.createFromExisting(os.path.join(layout_path, 'test_five_tabpages.touchosc'))


merge = pytouchosc.utilities.merge_layouts

class TestUtilities_MergeLayouts(unittest.TestCase):
	def setUp(self):
		pass

	def testWithWrongInput_NonList(self):
		with self.assertRaises(ValueError) as cm:
			merge(1.0)
		self.assertEqual(cm.exception.message, "Input argument layouts is not a list.")

	def testWithWrongInput_ListWithoutTabpages(self):
		with self.assertRaises(ValueError) as cm: