Example #1
0
	def testBindLibrary(self):
		"""
		Tests :meth:`foundations.library.Library.bindLibrary` method.
		"""

		for name, path in LIBRARIES.iteritems():
			library = Library(path, bindLibrary=False)
			library.functions = LIBRARIES_FUNCTIONS[name]
			library.bindLibrary()
			for function in LIBRARIES_FUNCTIONS[name]:
				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))