Removed ability to run "pecan serve {{ module }}" (as config file).

This commit is contained in:
Jeremy M. Jones
2011-09-02 11:31:22 -04:00
parent 28d9a47d15
commit 4efacc0af9
3 changed files with 4 additions and 21 deletions

View File

@@ -158,12 +158,6 @@ To get up and running in no time the template helps a lot!
If you fail to pass an argument you will get a small error message asking
for a configuration file.
The location for the config file and the argument itself are very flexible. You
can pass an absolute path or just the name of the file without an extension,
like::
$ pecan serve config
Simple Configuration
--------------------

View File

@@ -207,15 +207,12 @@ def initconf():
def set_config(name):
'''
Updates the global configuration from a path or filename.
Updates the global configuration a filename.
:param name: Path or filename, as a string.
:param name: filename, as a string.
'''
if '/' in name:
_runtime_conf.update(conf_from_file(name))
else:
_runtime_conf.update_with_module(name)
_runtime_conf.update(conf_from_file(name))
_runtime_conf = initconf()

View File

@@ -108,14 +108,6 @@ class TestConf(TestCase):
configuration.set_config(path)
assert list(_runtime_conf.server) == list(configuration.initconf().server)
def test_config_set_from_module(self):
configuration.set_config('config')
self.assertEqual(_runtime_conf.server.host, '1.1.1.1')
def test_config_set_from_module_with_extension(self):
configuration.set_config('config.py')
self.assertEqual(_runtime_conf.server.host, '1.1.1.1')
def test_config_dir(self):
if sys.version_info >= (2, 6):
conf = configuration.Config({})