wizlib 0.9.2__py3-none-any.whl → 0.9.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wizlib might be problematic. Click here for more details.
wizlib/config_machine.py
CHANGED
|
@@ -2,6 +2,7 @@ from argparse import Namespace
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
import os
|
|
4
4
|
from dataclasses import dataclass
|
|
5
|
+
from unittest.mock import patch
|
|
5
6
|
|
|
6
7
|
from yaml import load
|
|
7
8
|
from yaml import Loader
|
|
@@ -67,3 +68,16 @@ class ConfigMachine:
|
|
|
67
68
|
"""Allows a Command class to also inherit from ConfigMachine. List
|
|
68
69
|
ConfigMachine first."""
|
|
69
70
|
parser.add_argument('--config', action='store')
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def nohome_test(): # pragma: nocover
|
|
74
|
+
"""Fake out a ConfigMachine so that it thinks test/files is the home
|
|
75
|
+
directory. This way it's not tempted to pull real configuration."""
|
|
76
|
+
return patch('pathlib.Path.home', lambda: Path('test/files'))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def patchconfig_test(**kwargs): # pragma: nocover
|
|
80
|
+
"""Hand testable config data to a test method. First pass: always return
|
|
81
|
+
None."""
|
|
82
|
+
methodpath = 'wizlib.config_machine.ConfigMachine.config_get'
|
|
83
|
+
return patch(methodpath, lambda s, t: True)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
wizlib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
wizlib/class_family.py,sha256=IBdHPXouJDgxu3nOFE48QlRHYFyTGhTk_HbfnNTK-m8,4413
|
|
3
3
|
wizlib/command_handler.py,sha256=3NKXfkH-orBm8G-KCVLPW1YuvtHC59lLYMyaK8VVwg4,3033
|
|
4
|
-
wizlib/config_machine.py,sha256=
|
|
4
|
+
wizlib/config_machine.py,sha256=OUGXx_ixAMmfQGlaxg7R7a6IRKK1qK5qX16ZOhLAMbQ,2819
|
|
5
5
|
wizlib/rlinput.py,sha256=l00Pa3rxNeY6LJgz8Aws_rTKoEchw33fuL8yqHF9_-o,1754
|
|
6
6
|
wizlib/super_wrapper.py,sha256=F834ytHqA7zegTD1ezk_uxlF9PLygh84wReuiqcI7BI,272
|
|
7
|
-
wizlib-0.9.
|
|
8
|
-
wizlib-0.9.
|
|
9
|
-
wizlib-0.9.
|
|
10
|
-
wizlib-0.9.
|
|
7
|
+
wizlib-0.9.3.dist-info/METADATA,sha256=iql89LJy4DT8bw2ijjeScXAfbl1hjsF-cyZhFQRFEsk,5529
|
|
8
|
+
wizlib-0.9.3.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
9
|
+
wizlib-0.9.3.dist-info/top_level.txt,sha256=PhxyT43KqCsarAe-YroORUZRMTLA-zwTAaADXKjNcB4,7
|
|
10
|
+
wizlib-0.9.3.dist-info/RECORD,,
|
|
File without changes
|