File tree 2 files changed +13
-3
lines changed
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 9
9
IlabConfigShow - command ``/usr/bin/ilab config show``
10
10
------------------------------------------------------
11
11
"""
12
- from insights import YAMLParser
13
- from insights .core import CommandParser
12
+ from insights .core import CommandParser , YAMLParser
14
13
from insights .core .plugins import parser
15
14
from insights .core .exceptions import SkipComponent , ParseException
16
15
from insights .specs import Specs
@@ -70,6 +69,8 @@ class IlabConfigShow(CommandParser, YAMLParser):
70
69
71
70
Sample output from ``/usr/bin/ilab config show``::
72
71
72
+ time="2025-04-15T08:23:44Z" level=warning msg="The input device is not a TTY. The --tty and --interactive flags might not work properly"
73
+ # Chat configuration section.
73
74
chat:
74
75
context: default
75
76
logs_dir: /root/.local/share/instructlab/chatlogs
@@ -99,4 +100,4 @@ class IlabConfigShow(CommandParser, YAMLParser):
99
100
Attributes:
100
101
data(dict): The ilab config information
101
102
"""
102
- pass
103
+ ignore_lines = [ 'time=' ]
Original file line number Diff line number Diff line change 38
38
ILAB_MODULE_LIST_EMPTY = ""
39
39
40
40
ILAB_CONFIG_SHOW = """
41
+ time="2025-04-15T08:23:44Z" level=warning msg="The input device is not a TTY. The --tty and --interactive flags might not work properly"
42
+ # Chat configuration section.
41
43
chat:
44
+ # Predefined setting or environment that influences the behavior and responses of
45
+ # the chat assistant. Each context is associated with a specific prompt that
46
+ # guides the assistant on how to respond to user inputs. Available contexts:
42
47
context: default
43
48
logs_dir: /root/.local/share/instructlab/chatlogs
44
49
max_tokens:
60
65
""" .strip ()
61
66
62
67
ILAB_CONFIG_SHOW_ERROR = ILAB_MODULE_LIST_ERROR
68
+ ILAB_CONFIG_SHOW_EMPTY = ILAB_MODULE_LIST_EMPTY
63
69
64
70
65
71
def test_ilab_model_list ():
@@ -88,6 +94,9 @@ def test_ilab_config_show():
88
94
with pytest .raises (ParseException ):
89
95
IlabConfigShow (context_wrap (ILAB_CONFIG_SHOW_ERROR ))
90
96
97
+ with pytest .raises (SkipComponent ):
98
+ IlabModuleList (context_wrap (ILAB_CONFIG_SHOW_EMPTY ))
99
+
91
100
92
101
def test_ilab_doc_examples ():
93
102
env = {
You can’t perform that action at this time.
0 commit comments