Example #1
0
    def testBindFunction(self):
        """
		This method tests :meth:`foundations.library.Library.bindFunction` method.
		"""

        for name, path in LIBRARIES.iteritems():
            library = Library(path)
            library.functions = LIBRARIES_FUNCTIONS[name]
            for function in LIBRARIES_FUNCTIONS[name]:
                hasattr(library, function.name) and delattr(library, function.name)
                library.bindFunction(function)
                self.assertTrue(hasattr(library, function.name))
Example #2
0
	def testBindFunction(self):
		"""
		Tests :meth:`foundations.library.Library.bindFunction` method.
		"""

		for name, path in LIBRARIES.iteritems():
			library = Library(path)
			library.functions = LIBRARIES_FUNCTIONS[name]
			for function in LIBRARIES_FUNCTIONS[name]:
				hasattr(library, function.name) and delattr(library, function.name)
				library.bindFunction(function)
				self.assertTrue(hasattr(library, function.name))