|
17 | 17 | test_tools.skip_if_missing('clinic')
|
18 | 18 | with test_tools.imports_under_tool('clinic'):
|
19 | 19 | import libclinic
|
| 20 | + from libclinic.converters import int_converter, str_converter |
20 | 21 | import clinic
|
21 | 22 | from clinic import DSLParser
|
22 | 23 |
|
@@ -924,7 +925,7 @@ def test_param(self):
|
924 | 925 | self.assertEqual(2, len(function.parameters))
|
925 | 926 | p = function.parameters['path']
|
926 | 927 | self.assertEqual('path', p.name)
|
927 |
| - self.assertIsInstance(p.converter, clinic.int_converter) |
| 928 | + self.assertIsInstance(p.converter, int_converter) |
928 | 929 |
|
929 | 930 | def test_param_default(self):
|
930 | 931 | function = self.parse_function("""
|
@@ -1023,7 +1024,7 @@ def test_param_no_docstring(self):
|
1023 | 1024 | """)
|
1024 | 1025 | self.assertEqual(3, len(function.parameters))
|
1025 | 1026 | conv = function.parameters['something_else'].converter
|
1026 |
| - self.assertIsInstance(conv, clinic.str_converter) |
| 1027 | + self.assertIsInstance(conv, str_converter) |
1027 | 1028 |
|
1028 | 1029 | def test_param_default_parameters_out_of_order(self):
|
1029 | 1030 | err = (
|
@@ -2040,7 +2041,7 @@ def test_legacy_converters(self):
|
2040 | 2041 | block = self.parse('module os\nos.access\n path: "s"')
|
2041 | 2042 | module, function = block.signatures
|
2042 | 2043 | conv = (function.parameters['path']).converter
|
2043 |
| - self.assertIsInstance(conv, clinic.str_converter) |
| 2044 | + self.assertIsInstance(conv, str_converter) |
2044 | 2045 |
|
2045 | 2046 | def test_legacy_converters_non_string_constant_annotation(self):
|
2046 | 2047 | err = "Annotations must be either a name, a function call, or a string"
|
|
0 commit comments