From: Kefu Chai Date: Wed, 9 Jun 2021 03:24:37 +0000 (+0800) Subject: test/pybind/test_ceph_argparse: decorate helper method with @nottest X-Git-Tag: v16.2.5~7^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=510c23bd8594585b78e35c89718dee3f7f1ded3d;p=ceph.git test/pybind/test_ceph_argparse: decorate helper method with @nottest otherwise nose tries to run it as a test as its name contains "test", like E. ====================================================================== ERROR: Runs validate in different arg/kargs ways. ---------------------------------------------------------------------- TypeError: arg_kwarg_test() missing 3 required positional arguments: 'prefix', 'args', and 'sig' Signed-off-by: Kefu Chai (cherry picked from commit 3d7516f8daefcefa06a46981a62442d9193164f6) --- diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 8b8de5fea40b..dfdf253b0682 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -17,7 +17,8 @@ from nose.tools import assert_equal, assert_raises, \ assert_not_in, assert_in, \ - assert_regexp_matches + assert_regexp_matches, \ + nottest from unittest import TestCase from ceph_argparse import validate_command, parse_json_funcsigs, validate, \ @@ -1265,6 +1266,7 @@ class TestValidate(TestCase): self.sig = parse_funcsig(self.prefix + self.args_dict) + @nottest def arg_kwarg_test(self, prefix, args, sig, arg_type=0): """ Runs validate in different arg/kargs ways.