(self)
| 1240 | self.assertEqual(p.converter.c_default, '0x1f40d') |
| 1241 | |
| 1242 | def test_param_default_bool(self): |
| 1243 | function = self.parse_function(r""" |
| 1244 | module test |
| 1245 | test.func |
| 1246 | bool: bool = True |
| 1247 | intbool: bool(accept={int}) = True |
| 1248 | intbool2: bool(accept={int}) = 2 |
| 1249 | """) |
| 1250 | p = function.parameters['bool'] |
| 1251 | self.assertIs(p.default, True) |
| 1252 | self.assertEqual(p.converter.py_default, 'True') |
| 1253 | self.assertEqual(p.converter.c_default, '1') |
| 1254 | |
| 1255 | p = function.parameters['intbool'] |
| 1256 | self.assertIs(p.default, True) |
| 1257 | self.assertEqual(p.converter.py_default, 'True') |
| 1258 | self.assertEqual(p.converter.c_default, '1') |
| 1259 | |
| 1260 | p = function.parameters['intbool2'] |
| 1261 | self.assertEqual(p.default, 2) |
| 1262 | self.assertEqual(p.converter.py_default, '2') |
| 1263 | self.assertEqual(p.converter.c_default, '2') |
| 1264 | |
| 1265 | def test_param_default_expr_named_constant(self): |
| 1266 | function = self.parse_function(""" |
nothing calls this directly
no test coverage detected