|
20 | 20 |
|
21 | 21 | import os
|
22 | 22 | import textwrap
|
23 |
| -import unittest |
24 | 23 |
|
25 | 24 | from fire import formatting
|
26 | 25 | from fire import helptext
|
@@ -160,21 +159,19 @@ def testHelpTextNoInit(self):
|
160 | 159 | self.assertIn('NAME\n OldStyleEmpty', help_screen)
|
161 | 160 | self.assertIn('SYNOPSIS\n OldStyleEmpty', help_screen)
|
162 | 161 |
|
163 |
| - @unittest.skipIf( |
164 |
| - six.PY2, |
165 |
| - 'Python 2 does not support single asterisk in function definition') |
| 162 | + @testutils.skipIf( |
| 163 | + six.PY2, 'Python 2 does not support keyword-only arguments.') |
166 | 164 | def testHelpTextKeywordOnlyArgumentsWithDefault(self):
|
167 |
| - component = tc.py3.KeywordOnly.with_default |
| 165 | + component = tc.py3.KeywordOnly.with_default # pytype: disable=module-attr |
168 | 166 | output = helptext.HelpText(
|
169 | 167 | component=component, trace=trace.FireTrace(component, 'with_default'))
|
170 | 168 | self.assertIn('NAME\n with_default', output)
|
171 | 169 | self.assertIn('FLAGS\n --x=X', output)
|
172 | 170 |
|
173 |
| - @unittest.skipIf( |
174 |
| - six.PY2, |
175 |
| - 'Python 2 does not support single asterisk in function definition') |
| 171 | + @testutils.skipIf( |
| 172 | + six.PY2, 'Python 2 does not support keyword-only arguments.') |
176 | 173 | def testHelpTextKeywordOnlyArgumentsWithoutDefault(self):
|
177 |
| - component = tc.py3.KeywordOnly.double |
| 174 | + component = tc.py3.KeywordOnly.double # pytype: disable=module-attr |
178 | 175 | output = helptext.HelpText(
|
179 | 176 | component=component, trace=trace.FireTrace(component, 'double'))
|
180 | 177 | self.assertIn('NAME\n double', output)
|
|
0 commit comments