This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from adelosa/feature/add-module-config-test
Add test to ensure that config installed with package
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |