]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/pybind/test_ceph_argparse: decorate helper method with @nottest
authorKefu Chai <kchai@redhat.com>
Wed, 9 Jun 2021 03:24:37 +0000 (11:24 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 14 Jun 2021 01:50:47 +0000 (09:50 +0800)
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 <kchai@redhat.com>
src/test/pybind/test_ceph_argparse.py

index 8b8de5fea40bca6a49c967947d365a2fa68ad789..dfdf253b0682fa957a304af306b783475ee1d22b 100755 (executable)
@@ -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.