예제 #1
0
파일: universe.py 프로젝트: Gabri3l/PySOM
    def new_string(self, embedded_string):
        # Allocate a new string and set its class to be the string class
        result = String(self._nilObject, embedded_string)
        result.set_class(self._stringClass)

        # Return the freshly allocated string
        return result
예제 #2
0
파일: universe.py 프로젝트: QDucasse/PySOM
    def new_string(self, embedded_string):
        # Allocate a new string and set its class to be the string class
        result = String(self._nilObject, embedded_string)
        result.set_class(self._stringClass)

        # Return the freshly allocated string
        return result
예제 #3
0
class StringTestCase(unittest.TestCase):
    def setUp(self):
        self.string = String(Object(None), "test")

    def test_get_embedded_string(self):
        self.assertEqual("test", self.string.get_embedded_string())

    def test_str(self):
        self.assertEqual("\'test\'", str(self.string))
예제 #4
0
 def new_string(embedded_string):
     return String(embedded_string)
예제 #5
0
 def setUp(self):
     self.string = String(Object(None), "test")
예제 #6
0
 def __init__(self, value):
     String.__init__(self, value)
     self._number_of_signature_arguments = self._determine_number_of_signature_arguments(
     )  # updated later
예제 #7
0
 def __init__(self, value):
     String.__init__(self, value)
     self._number_of_signature_arguments = self._determine_number_of_signature_arguments() # updated later