Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #41 from adelosa/feature/add-module-config-test
Browse files Browse the repository at this point in the history
Add test to ensure that config installed with package
  • Loading branch information
adelosa authored Nov 25, 2016
2 parents 502b9de + c07641f commit fd10d3e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ recursive-exclude * *.py[co]

recursive-include docs *.rst conf.py Makefile make.bat

recursive-include *.yml
recursive-include mciutil *.yml
include versioneer.py
include mciutil/_version.py
24 changes: 24 additions & 0 deletions tests/test_cli_common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from __future__ import absolute_import
import unittest
import os

from mciutil.cli.common import get_config_filename


class CliCommonTests(unittest.TestCase):
def test_get_config_filename(self):
"""
check that package default config exists, otherwise fail
this will show up on remote build when package is installed
rather than pointing to development environment
"""
filename = get_config_filename('mideu.yml')
self.assertTrue(os.path.exists(filename))

print("config filename={0}".format(filename))
if not os.path.isdir(".git"):
print("Checking that config from site-packages")
self.assertNotEqual(filename.find("site-packages"), -1)

if __name__ == '__main__':
unittest.main()

0 comments on commit fd10d3e

Please sign in to comment.