Merge branch 'commands' of github.com:cleverdevil/pecan into commands
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
if __name__ == '__main__':
|
||||
from pecan import commands
|
||||
commands.run()
|
||||
from pecan.commands import CommandRunner
|
||||
CommandRunner.handle_command_line()
|
||||
|
||||
@@ -66,7 +66,7 @@ class Command(paste_command.Command):
|
||||
|
||||
def logging_file_config(self, config_file):
|
||||
if os.path.splitext(config_file)[1].lower() == '.ini':
|
||||
Command.logging_file_config(self, config_file)
|
||||
paste_command.Command.logging_file_config(self, config_file)
|
||||
|
||||
def command(self):
|
||||
pass
|
||||
|
||||
@@ -82,6 +82,11 @@ class TestConf(TestCase):
|
||||
|
||||
self.assertTrue('__confdir__' in dir(conf))
|
||||
|
||||
def test_config_file(self):
|
||||
conf = configuration.initconf()
|
||||
|
||||
self.assertTrue('__conffile__' in dir(conf))
|
||||
|
||||
def test_config_repr(self):
|
||||
conf = configuration.Config({'a':1})
|
||||
self.assertEqual(repr(conf),"Config({'a': 1})")
|
||||
@@ -98,7 +103,7 @@ class TestConf(TestCase):
|
||||
def test_config_illegal_ids(self):
|
||||
conf = configuration.Config({})
|
||||
conf.update_with_module('bad.module_and_underscore')
|
||||
self.assertEqual(['__confdir__'], dir(conf))
|
||||
self.assertEqual(['__confdir__', '__conffile__'], dir(conf))
|
||||
|
||||
def test_config_bad_module(self):
|
||||
conf = configuration.Config({})
|
||||
|
||||
Reference in New Issue
Block a user