Esempio n. 1
0
def run_test(name, args):
    context_config = store_context()
    actions.reset_base_url()
    actions.set_wait_timeout(10, 0.1)

    try:
        return _execute_test(name, args)
    finally:
        restore_context(context_config)
Esempio n. 2
0
    def setUp(self):
		if allscrewedup : print "ENTERING SETUP"
		self.script_path = os.path.join(self.script_dir, self.script_name)
		sys.path.append(self.script_dir)
		self.addCleanup(sys.path.remove, self.script_dir)
		self._compile_script()
		# The script may override some settings. The default value for
		# JAVASCRIPT_DISABLED and ASSUME_TRUSTED_CERT_ISSUER are False, so if
		# the user mentions them in his script, it's to turn them on. Also,
		# getting our hands on the values used in the script is too hackish ;)
		if 'JAVASCRIPT_DISABLED' in self.code.co_names:
			self.javascript_disabled = True
		if 'ASSUME_TRUSTED_CERT_ISSUER' in self.code.co_names:
			self.assume_trusted_cert_issuer = True
		nsUITestCase.setUp(self)
		# Start with default values
		actions.reset_base_url()
		actions._set_wait_timeout(10, 0.1)
		# Possibly inject parametrization from associated .csv file
		context.populate_context(self.context, self.script_path,
					 self.browser_type, self.javascript_disabled)