1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
9 from arvados import _internal
13 @_internal.deprecated('TestVersion', 'arvados.noop')
17 This function returns None.
20 @pytest.mark.parametrize('pattern', [
22 r'^ +.. WARNING:: Deprecated$',
23 r' removed in Arvados TestVersion\.',
24 r' Prefer arvados\.noop\b',
25 r'^ +This function returns None\.$',
27 def test_docstring(self, pattern):
28 assert re.search(pattern, self.noop_func.__doc__, re.MULTILINE) is not None
30 def test_deprecation_warning(self):
31 with pytest.warns(DeprecationWarning) as check:
33 actual = str(check[0].message)
34 assert ' removed in Arvados TestVersion.' in actual
35 assert ' Prefer arvados.noop ' in actual