From 61785e614c9ee1f0f16f8d8f1fd18b92a1981b4a Mon Sep 17 00:00:00 2001 From: David Bieber Date: Thu, 19 Mar 2020 12:47:16 -0700 Subject: [PATCH] Switch from unittest to testutils. PiperOrigin-RevId: 301875411 Change-Id: Ie5df8560ce1a17f3cbf30b8087fb807398eb5ee0 --- fire/helptext_test.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/fire/helptext_test.py b/fire/helptext_test.py index 00e88c2d..3619fb06 100644 --- a/fire/helptext_test.py +++ b/fire/helptext_test.py @@ -20,7 +20,6 @@ import os import textwrap -import unittest from fire import formatting from fire import helptext @@ -160,21 +159,19 @@ def testHelpTextNoInit(self): self.assertIn('NAME\n OldStyleEmpty', help_screen) self.assertIn('SYNOPSIS\n OldStyleEmpty', help_screen) - @unittest.skipIf( - six.PY2, - 'Python 2 does not support single asterisk in function definition') + @testutils.skipIf( + six.PY2, 'Python 2 does not support keyword-only arguments.') def testHelpTextKeywordOnlyArgumentsWithDefault(self): - component = tc.py3.KeywordOnly.with_default + component = tc.py3.KeywordOnly.with_default # pytype: disable=module-attr output = helptext.HelpText( component=component, trace=trace.FireTrace(component, 'with_default')) self.assertIn('NAME\n with_default', output) self.assertIn('FLAGS\n --x=X', output) - @unittest.skipIf( - six.PY2, - 'Python 2 does not support single asterisk in function definition') + @testutils.skipIf( + six.PY2, 'Python 2 does not support keyword-only arguments.') def testHelpTextKeywordOnlyArgumentsWithoutDefault(self): - component = tc.py3.KeywordOnly.double + component = tc.py3.KeywordOnly.double # pytype: disable=module-attr output = helptext.HelpText( component=component, trace=trace.FireTrace(component, 'double')) self.assertIn('NAME\n double', output)