Home
last modified time | relevance | path

Searched refs:repr (Results 1 – 25 of 561) sorted by relevance

12345678910>>...23

/third_party/python/Lib/test/
Dtest_reprlib.py15 from reprlib import repr as r # Don't shadow builtin repr
34 expected = repr(s)[:13] + "..." + repr(s)[-14:]
37 eq(r("\"'"), repr("\"'"))
39 expected = repr(s)[:13] + "..." + repr(s)[-14:]
51 expected = repr(t3)[:-2] + "...)"
52 eq(r2.repr(t3), expected)
123 eq(r(123), repr(123))
124 eq(r(123), repr(123))
125 eq(r(1.0/3), repr(1.0/3))
128 expected = repr(n)[:18] + "..." + repr(n)[-19:]
[all …]
Dtest_module.py29 self.fail("__name__ = %s" % repr(s))
183 self.assertEqual(repr(m), "<module '?'>")
187 self.assertEqual(repr(m), "<module 'foo'>")
192 self.assertEqual(repr(m), "<module 'foo' from '/tmp/foo.py'>")
198 self.assertEqual(repr(m), "<module '?' from '/tmp/foo.py'>")
203 self.assertEqual(repr(m), "<module 'foo'>")
210 loader_repr = repr(BareLoader)
212 repr(m), "<module '?' ({})>".format(loader_repr))
222 loader_repr = repr(FullLoader)
224 repr(m), "<module '?' ({})>".format(loader_repr))
[all …]
Dtest_univnewlines.py64 self.assertEqual(repr(fp.newlines), repr(self.NEWLINE))
70 self.assertEqual(repr(fp.newlines), repr(self.NEWLINE))
80 self.assertEqual(repr(fp.newlines), repr(self.NEWLINE))
111 self.assertEqual(repr(fp.newlines), repr(None))
114 self.assertEqual(repr(fp.newlines), repr(self.NEWLINE))
Dtest_hash.py280 repr_ = repr('abc')
281 repr_long = repr('abcdefghijk')
282 repr_ucs2 = repr('äú∑ℇ')
297 repr_ = repr(b'abc')
298 repr_long = repr(b'abcdefghijk')
318 repr_ = repr(datetime.date(1066, 10, 14))
321 repr_ = repr(datetime.datetime(1, 2, 3, 4, 5, 6, 7))
324 repr_ = repr(datetime.time(0))
Dtest_defaultdict.py61 self.assertEqual(repr(d1), "defaultdict(None, {})")
62 self.assertEqual(eval(repr(d1)), d1)
64 self.assertEqual(repr(d1), "defaultdict(None, {11: 41})")
68 self.assertEqual(repr(d2), "defaultdict(<class 'int'>, {12: 42})")
73 self.assertEqual(repr(d3), "defaultdict(%s, {13: 43})" % repr(foo))
138 self.assertRegex(repr(d),
Dtest_collections.py104 self.assertIn(repr(d), [ # check repr
126 eval(repr(d))
333 self.assertNotIn("u'", repr(nt._fields))
335 self.assertNotIn("u'", repr(nt._fields))
438 self.assertEqual(repr(Point.x), "_tuplegetter(0, 'Alias for field number 0')")
439 self.assertEqual(repr(Point.y), "_tuplegetter(1, 'Alias for field number 1')")
444 self.assertEqual(repr(Point.x), "_tuplegetter(0, 'The x-coordinate')")
445 self.assertEqual(repr(Point.y), "_tuplegetter(1, 'The y-coordinate')")
476 self.assertEqual(repr(p), 'Point(x=11, y=22)')
493 self.assertEqual(repr(p), 'Point(x=11, y=22)')
[all …]
/third_party/python/Lib/ctypes/test/
Dtest_parameters.py226 self.assertRegex(repr(c_bool.from_param(True)), r"^<cparam '\?' at 0x[A-Fa-f0-9]+>$")
227 self.assertEqual(repr(c_char.from_param(97)), "<cparam 'c' ('a')>")
228 self.assertRegex(repr(c_wchar.from_param('a')), r"^<cparam 'u' at 0x[A-Fa-f0-9]+>$")
229 self.assertEqual(repr(c_byte.from_param(98)), "<cparam 'b' (98)>")
230 self.assertEqual(repr(c_ubyte.from_param(98)), "<cparam 'B' (98)>")
231 self.assertEqual(repr(c_short.from_param(511)), "<cparam 'h' (511)>")
232 self.assertEqual(repr(c_ushort.from_param(511)), "<cparam 'H' (511)>")
233 self.assertRegex(repr(c_int.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
234 self.assertRegex(repr(c_uint.from_param(20000)), r"^<cparam '[LI]' \(20000\)>$")
235 self.assertRegex(repr(c_long.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
[all …]
Dtest_repr.py21 self.assertTrue(repr(base(42)).startswith(base.__name__))
22 self.assertEqual("<X object at", repr(typ(42))[:12])
25 self.assertEqual("c_char(b'x')", repr(c_char(b'x')))
26 self.assertEqual("<X object at", repr(X(b'x'))[:12])
/third_party/libxml2/python/tests/
Doutbuf.py38 print(' got: %s' % repr(f.getvalue()))
39 print('expected: %s' % repr(expected))
62 print(' got: %s' % repr(f.getvalue()))
63 print('expected: %s' % repr(expected[i]))
83 print(' got: %s' % repr(f.getvalue()))
84 print('expected: %s' % repr(expected))
91 print(' got: %s' % repr(f.getvalue()))
92 print('expected: %s' % repr(expected))
/third_party/skia/third_party/externals/freetype/src/tools/
Dcordic.py11 print "table of arctan( 1/2^n ) for PI = " + repr(units/65536.0) + " units"
23 sys.stdout.write( comma + repr( int(angle2) ) )
29 print "shrink factor = " + repr( shrink )
30 print "shrink factor 2 = " + repr( int( shrink * (2**32) ) )
31 print "expansion factor = " + repr( 1/shrink )
/third_party/flutter/skia/third_party/externals/freetype/src/tools/
Dcordic.py11 print "table of arctan( 1/2^n ) for PI = " + repr(units/65536.0) + " units"
23 sys.stdout.write( comma + repr( int(angle2) ) )
29 print "shrink factor = " + repr( shrink )
30 print "shrink factor 2 = " + repr( int( shrink * (2**32) ) )
31 print "expansion factor = " + repr( 1/shrink )
/third_party/freetype/src/tools/
Dcordic.py11 print "table of arctan( 1/2^n ) for PI = " + repr(units/65536.0) + " units"
23 sys.stdout.write( comma + repr( int(angle2) ) )
29 print "shrink factor = " + repr( shrink )
30 print "shrink factor 2 = " + repr( int( shrink * (2**32) ) )
31 print "expansion factor = " + repr( 1/shrink )
/third_party/python/Doc/library/
Dreprlib.rst1 :mod:`reprlib` --- Alternate :func:`repr` implementation
5 :synopsis: Alternate repr() implementation with size limits.
23 similar to the built-in :func:`repr`; size limits for different object types
30 :func:`.repr` function described below. Changing the attributes of this
31 object will affect the size limits used by :func:`.repr` and the Python
35 .. function:: repr(obj)
37 This is the :meth:`~Repr.repr` method of ``aRepr``. It returns a string
58 ... return '<' + '|'.join(map(repr, self)) + '>'
118 .. method:: Repr.repr(obj)
120 The equivalent to the built-in :func:`repr` that uses the formatting imposed by
[all …]
/third_party/boost/libs/wave/test/testwave/
Dcollect_hooks_information.hpp51 inline String repr(boost::wave::util::file_position<String> const& pos) in repr() function
58 inline String repr(String const& value) in repr() function
158 strm << "00: " << repr(macrocall.get_position()) << ": " in expanding_function_like_macro()
170 strm << "[" << repr(macro.get_position()) << ": " in expanding_function_like_macro()
212 strm << "01: " << repr(macro.get_position()) << ": " in expanding_object_like_macro()
422 strm << "08: " << repr(macro.get_position()) << ": " in defined_macro()
459 strm << "09: " << repr(macro.get_position()) << ": " in undefined_macro()
487 strm << "10: " << repr(directive.get_position()) << ": " in found_directive()
524 strm << "11: " << repr(directive.get_position()) << ": " in evaluated_conditional_expression()
551 strm << "12: " << repr(token.get_position()) << ": >" in skipped_token()
[all …]
/third_party/boost/libs/python/test/
Dtest_cltree.py34 assert repr(b)=='cltree.basic()'
36 assert repr(s)!='cltree.wrapped_symbol()' # because not isinstance(s,basic)
38 assert repr(c)=='cltree.constant()'
40 assert repr(v)=='cltree.wrapped_variable()'
/third_party/python/Lib/
Dpprint.py185 object.__dataclass_params__.repr and
198 items = [(f.name, getattr(object, f.name)) for f in _dataclasses.fields(object) if f.repr]
224 stream.write(repr(object))
254 stream.write(repr(object))
275 write(repr(object))
284 rep = repr(line)
301 if len(repr(candidate)) > max_width2:
303 chunks.append(repr(current))
308 chunks.append(repr(current))
326 write(repr(object))
[all …]
Dreprlib.py51 def repr(self, x): member in Repr
121 s = builtins.repr(x[:self.maxstring])
125 s = builtins.repr(x[:i] + x[len(x)-j:])
130 s = builtins.repr(x) # XXX Hope this isn't too slow...
139 s = builtins.repr(x)
161 repr = aRepr.repr variable
Ddataclasses.py236 type_name = repr(self.type)
266 def __init__(self, default, default_factory, init, repr, hash, compare, argument
273 self.repr = repr
324 def __init__(self, init, repr, eq, order, unsafe_hash, frozen): argument
326 self.repr = repr
346 def field(*, default=MISSING, default_factory=MISSING, init=True, repr=True, argument
366 return Field(default, default_factory, init, repr, hash, compare,
603 fields_str = '(' + ','.join(repr(f.name) for f in fields) + ',)'
882 def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen, argument
900 setattr(cls, _PARAMS, _DataclassParams(init, repr, eq, order,
[all …]
/third_party/boost/boost/icl/type_traits/
Dto_string.hpp33 std::stringstream repr; in apply() local
34 repr << value; in apply()
35 return repr.str(); in apply()
/third_party/python/Lib/test/test_asyncio/
Dtest_locks.py26 self.assertTrue(repr(lock).endswith('[unlocked]>'))
27 self.assertTrue(RGX_REPR.match(repr(lock)))
30 self.assertTrue(repr(lock).endswith('[locked]>'))
31 self.assertTrue(RGX_REPR.match(repr(lock)))
296 self.assertTrue(repr(ev).endswith('[unset]>'))
297 match = RGX_REPR.match(repr(ev))
301 self.assertTrue(repr(ev).endswith('[set]>'))
302 self.assertTrue(RGX_REPR.match(repr(ev)))
305 self.assertTrue('waiters:1' in repr(ev))
306 self.assertTrue(RGX_REPR.match(repr(ev)))
[all …]
/third_party/node/test/parallel/
Dtest-crypto-key-objects-messageport.js46 for (const [key, repr] of keys) {
52 assert.strictEqual(keyToString(key), repr);
55 assert.strictEqual(keyToString(key), repr);
63 assert.strictEqual(receivedRepresentation, repr);
/third_party/boost/boost/icl/concept/
Dinterval_bounds.hpp85 shift_lower(interval_bounds decl, interval_bounds repr, const Type& low) in shift_lower() argument
87 if(is_left_closed(decl) && !is_left_closed(repr)) in shift_lower()
89 else if(!is_left_closed(decl) && is_left_closed(repr)) in shift_lower()
97 shift_upper(interval_bounds decl, interval_bounds repr, const Type& up) in shift_upper() argument
99 if(!is_right_closed(decl) && is_right_closed(repr)) in shift_upper()
101 else if(is_right_closed(decl) && !is_right_closed(repr)) in shift_upper()
/third_party/optimized-routines/math/tools/
Dremez.jl223 @debug("gausselim", "matrix=", repr(M))
224 @debug("gausselim", "vector=", repr(V))
269 @debug("gausselim", "matrix=", repr(M))
270 @debug("gausselim", "vector=", repr(V))
364 @debug("leastsquares", "sums=", repr(sums))
396 @debug("leastsquares", "matrix=", repr(matrix))
397 @debug("leastsquares", "vector=", repr(vector))
402 @debug("leastsquares", "all_coeffs=", repr(all_coeffs))
623 @debug("equaldev", "n=", n, " d=", d, " coords=", repr(coords))
653 @debug("equaldev", "matrix=", repr(matrix))
[all …]
/third_party/python/Lib/lib2to3/pgen2/
Dliterals.py41 assert s.startswith("'") or s.startswith('"'), repr(s[:1])
45 assert s.endswith(q), repr(s[-len(q):])
53 s = repr(c)
/third_party/mindspore/tests/st/ops/ascend/test_tensor_print/
Dtest_tensor_print.py74 assert (repr(value) == repr(expect)), repr("output: " + value + ", expect: " + expect)

12345678910>>...23