Commit 8dd697b0 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

adjusted some values checking in test_generator

parent 50e4eaee
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ class test_generator(object):
			values = getattr(testcase_class, self.values)
		else:
			values = self.values
		if values is None:
			return
		for name, func in self._wrap(values):
			setattr(testcase_class, name, func)

@@ -110,11 +112,11 @@ class test_generator(object):
				kwds = {}
			elif self._is_kwds(values):
				kwds = values
				args = []
				args = tuple()
			else:
				args = values,
				kwds = {}
			wrapper = self._make_wrap(args, kwds)
			wrapper = self._make_wrap(tuple(args), dict(kwds))
			yield 'test_{0}_{1}'.format(wrapper.__name__, number), wrapper

		yield self.func.__name__, self.func
@@ -128,7 +130,7 @@ class test_generator(object):

	@staticmethod
	def _is_args(obj):
		return isinstance(obj, Iterable) and not isinstance(obj, string_types)
		return isinstance(obj, Iterable) and not isinstance(obj, string_types+(dict,))

	@staticmethod
	def _is_kwds(obj):