Пример #1
0
	def cmp_or_die(self,s,t,skip_ok=False,exit_val=0):
		ret = self.p.wait()
		if ret != exit_val:
			rdie(1,'test.py: spawned program exited with value {}'.format(ret))
		if s == t:
			if not skip_ok: ok()
		else:
			fs = 'ERROR: recoded data:\n{}\ndiffers from original data:\n{}'
			rdie(3,fs.format(repr(t),repr(s)))
Пример #2
0
	def cmp_or_die(self,s,t,skip_ok=False,exit_val=0):
		ret = self.p.wait()
		if ret != exit_val:
			die(1,red('test.py: spawned program exited with value {}'.format(ret)))
		if s == t:
			if not skip_ok: ok()
		else:
			sys.stderr.write(red(
				'ERROR: recoded data:\n%s\ndiffers from original data:\n%s\n' %
					(repr(t),repr(s))))
			sys.exit(3)