MCPcopy
hub / github.com/Textualize/rich / test_inspect_integer_with_methods_python310only

Function test_inspect_integer_with_methods_python310only

tests/test_inspect.py:269–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267@skip_py313
268@skip_py314
269def test_inspect_integer_with_methods_python310only():
270 expected = (
271 "╭──────────────── <class 'int'> ─────────────────╮\n"
272 "│ int([x]) -> integer │\n"
273 "│ int(x, base=10) -> integer │\n"
274 "│ │\n"
275 "│ denominator = 1 │\n"
276 "│ imag = 0 │\n"
277 "│ numerator = 1 │\n"
278 "│ real = 1 │\n"
279 "│ as_integer_ratio = def as_integer_ratio(): │\n"
280 "│ Return integer ratio. │\n"
281 "│ bit_count = def bit_count(): Number of │\n"
282 "│ ones in the binary │\n"
283 "│ representation of the │\n"
284 "│ absolute value of self. │\n"
285 "│ bit_length = def bit_length(): Number of │\n"
286 "│ bits necessary to represent │\n"
287 "│ self in binary. │\n"
288 "│ conjugate = def conjugate(...) Returns │\n"
289 "│ self, the complex conjugate │\n"
290 "│ of any int. │\n"
291 "│ from_bytes = def from_bytes(bytes, │\n"
292 "│ byteorder, *, │\n"
293 "│ signed=False): Return the │\n"
294 "│ integer represented by the │\n"
295 "│ given array of bytes. │\n"
296 "│ to_bytes = def to_bytes(length, │\n"
297 "│ byteorder, *, │\n"
298 "│ signed=False): Return an │\n"
299 "│ array of bytes representing │\n"
300 "│ an integer. │\n"
301 "╰────────────────────────────────────────────────╯\n"
302 )
303 assert render(1, methods=True) == expected
304
305
306@skip_py38

Callers

nothing calls this directly

Calls 1

renderFunction · 0.70

Tested by

no test coverage detected