remove worthless testing code from config.py and extend the test suite a little

This commit is contained in:
Chris Jones 2008-09-23 00:28:57 +01:00
parent e63785028e
commit 28b9c8e1d2
2 changed files with 8 additions and 33 deletions

View File

@ -427,36 +427,3 @@ class TerminatorConfValuestoreGConf (TerminatorConfValuestore):
else: else:
raise (KeyError) raise (KeyError)
if __name__ == '__main__':
stores = []
stores.append (TerminatorConfValuestoreRC ())
try:
import gconf
stores.append (TerminatorConfValuestoreGConf ())
except:
pass
foo = TerminatorConfig (stores)
## cmsj: this is my testing ground
## ensure that font is set in the Default gconf profile
## set titlebars in the RC file
## remove titletips from gconf/RC
## do not define blimnle in any way
# This should come from gconf (it's set by gnome-terminal)
print foo.font
# This should come from RC
print foo.titlebars
# This should come from defaults
print foo.titletips
# This should raise AttributeError
#print foo.blimnle
# http_proxy is a value that is allowed to not exist
print "final proxy: %s"%foo.http_proxy

View File

@ -37,3 +37,11 @@ class test_config():
assert store.type == "Base" assert store.type == "Base"
store.values['test_key'] = 'test_value' store.values['test_key'] = 'test_value'
assert store['test_key'] == 'test_value' assert store['test_key'] == 'test_value'
def test_TerminatorConfValuestoreDefault (self):
store = self.config.TerminatorConfValuestoreDefault ()
assert store.type == "Default"
assert store['extreme_tabs'] == False
assert store['titletips'] == False
assert store['enable_real_transparency'] == False # until the bug is fixed