Skip to content

Commit

Permalink
updated to use pyconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
LanceMaverick committed Jun 20, 2017
1 parent ef5dccb commit b8d50af
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,20 @@ def test_import_all_beards_return_None(self):


if __name__ == '__main__':
pyconfig.set('config_file', os.path.abspath('config.yml'))
with open(pyconfig.get('config_file')) as config_file:
for k, v in yaml.load(config_file).items():
pyconfig.set(k, v)
beard_paths = pyconfig.get('beard_paths')
pyconfig.set('beard_paths', [os.path.expanduser(x) for x in beard_paths])
stache_paths = pyconfig.get('stache_paths')
pyconfig.set('stache_paths', [os.path.expanduser(x) for x in stache_paths])


pyconfig.set('loglevel', parsed.loglevel)
pyconfig.set('start_server', parsed.start_server)
pyconfig.set('no_auto_pip', parsed.no_auto_pip)
pyconfig.set('auto_pip_upgrade', parsed.auto_pip_upgrade)
pyconfig.set('admins', [a[1] for a in pyconfig.get('admins')])

unittest.main()

0 comments on commit b8d50af

Please sign in to comment.