File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 12
12
import errno
13
13
import codecs
14
14
import random
15
+ import unittest
15
16
from tempfile import NamedTemporaryFile as ntf
16
17
from argparse import Namespace
17
18
20
21
from tldp .inventory import stypes , status_types
21
22
from tldp .sources import SourceDocument
22
23
from tldp .outputs import OutputDirectory
24
+ from tldp import VERSION
23
25
24
26
# -- Test Data
25
27
import example
@@ -127,6 +129,22 @@ def test_run_statustypes(self):
127
129
self .assertEqual (exitcode , os .EX_OK )
128
130
129
131
132
+ class TestDriverShowVersion (unittest .TestCase ):
133
+
134
+ def test_show_version (self ):
135
+ stdout = io .StringIO ()
136
+ result = tldp .driver .show_version (Namespace (), file = stdout )
137
+ self .assertEqual (result , os .EX_OK )
138
+ stdout .seek (0 )
139
+ data = stdout .read ().strip ()
140
+ for status in status_types :
141
+ self .assertEqual (VERSION , data )
142
+
143
+ def test_run_statustypes (self ):
144
+ exitcode = tldp .driver .run (['--version' ])
145
+ self .assertEqual (exitcode , os .EX_OK )
146
+
147
+
130
148
class TestDriverSummary (TestInventoryBase ):
131
149
132
150
def test_run_summary (self ):
You can’t perform that action at this time.
0 commit comments