Project

General

Profile

« Previous | Next » 

Revision 3fcff338

Added by jahoti almost 2 years ago

Make testing configurable

Add options to configure in accordance with #97

View differences:

test/misc_constants.py
41 41

  
42 42
default_cert_dir = here / 'certs'
43 43

  
44
# Use user-specified values instead where available
45
try:
46
	with open(str(here.parent / 'testing.conf')) as f:
47
		option = f.readline()
48
		while ' ' in option:
49
			key, value = option[:-1].split(' ', maxsplit=1)
50
			if key == 'BINARY':
51
				default_firefox_binary = value
52
			
53
			elif key == 'TEST_PROFILE':
54
				default_clean_profile_dir = value
55
			
56
			elif key == 'TEST_PORT':
57
				default_proxy_port = value
58
			
59
			else:
60
				raise KeyError(key)
61
			
62
			option = f.readline()
63
except FileNotFoundError:
64
	# There may be no defaults overridden; that's OK!
65
	pass
66

  
44 67
mime_types = {
45 68
	"7z": "application/x-7z-compressed",	"oga": "audio/ogg",
46 69
	"abw": "application/x-abiword",		"ogv": "video/ogg",

Also available in: Unified diff