Commit 50e4eaee authored by Dom Sekotill's avatar Dom Sekotill
Browse files

renamed wrap() argument with confusing name

One of the arguments of unittest_extra.generator.test_generator.wrap()
was confusingly named 'instance' even though it was a actually a class
object.
parent 89e1ada7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -90,16 +90,16 @@ class test_generator(object):
		self.func = func
		return self

	def wrap(self, instance):
	def wrap(self, testcase_class):
		"""
		Generate a test-wrapper with each set of arguments and add it to 'attr'.
		"""
		if isinstance(self.values, string_types):
			values = getattr(instance, self.values)
			values = getattr(testcase_class, self.values)
		else:
			values = self.values
		for name, func in self._wrap(values):
			setattr(instance, name, func)
			setattr(testcase_class, name, func)

	def _wrap(self, value_list):
		for number, values in enumerate(value_list):