Skip to content

Commit

Permalink
Loosen help text test for sonic-yang-mgmt
Browse files Browse the repository at this point in the history
The help text printed for sonic-yang-mgmt has slight differences
depending on the package versions. Loosen this check to only check the
options themselves, rather than the surrounding text.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
  • Loading branch information
saiarcot895 authored and pull[bot] committed Dec 6, 2024
1 parent bcc0b06 commit 900c89f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/sonic-yang-mgmt/tests/test_cfghelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
from unittest import TestCase

output1="""\
Error: Table or all option is required
usage: sonic-cfg-help [-h] [-t TABLE] [-f FIELD] [-p PRINT_FORMAT] [-a]
Description of table name
optional arguments:
-h, --help show this help message and exit
-t TABLE, --table TABLE
Table name
Expand Down Expand Up @@ -140,7 +134,7 @@ def run_script(self, argument):
def test_dummy_run(self):
argument = []
output = self.run_script(argument)
self.assertEqual(output, output1)
self.assertIn(output1, output)

def test_single_table(self):
argument = ['-t', 'AUTO_TECHSUPPORT']
Expand Down

0 comments on commit 900c89f

Please sign in to comment.