mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-17 22:14:25 +02:00
Ignored .py .sh
This commit is contained in:
parent
9142eeba3c
commit
840836702d
@ -56,6 +56,8 @@ class TestGetAppConfPaths(unittest.TestCase):
|
|||||||
if 'tests' in Path(dirpath).parts:
|
if 'tests' in Path(dirpath).parts:
|
||||||
continue
|
continue
|
||||||
for fname in files:
|
for fname in files:
|
||||||
|
if fname.endswith(('.py', '.sh')):
|
||||||
|
continue
|
||||||
file_path = Path(dirpath) / fname
|
file_path = Path(dirpath) / fname
|
||||||
try:
|
try:
|
||||||
text = file_path.read_text(encoding='utf-8')
|
text = file_path.read_text(encoding='utf-8')
|
||||||
@ -108,9 +110,13 @@ class TestGetAppConfPaths(unittest.TestCase):
|
|||||||
continue
|
continue
|
||||||
# users.*: default_users fallback
|
# users.*: default_users fallback
|
||||||
if dotted.startswith('users.'):
|
if dotted.startswith('users.'):
|
||||||
sub = dotted.split('.',1)[1]
|
subpath = dotted.split('.', 1)[1]
|
||||||
if sub in self.defaults_users:
|
try:
|
||||||
|
# this will raise if the nested key doesn’t exist
|
||||||
|
self.assertNested(self.defaults_users, subpath, 'default_users')
|
||||||
continue
|
continue
|
||||||
|
except AssertionError:
|
||||||
|
pass
|
||||||
# application defaults
|
# application defaults
|
||||||
for aid, cfg in self.defaults_app.items():
|
for aid, cfg in self.defaults_app.items():
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user