Home
last modified time | relevance | path

Searched refs:assertEqual (Results 1 – 25 of 831) sorted by relevance

12345678910>>...34

/third_party/python/Lib/test/
Dtest_int_literal.py12 self.assertEqual(0x0, 0X0)
13 self.assertEqual(0x1, 0X1)
14 self.assertEqual(0x123456789abcdef, 0X123456789abcdef)
16 self.assertEqual(0x0, 0)
17 self.assertEqual(0x10, 16)
18 self.assertEqual(0x7fffffff, 2147483647)
19 self.assertEqual(0x7fffffffffffffff, 9223372036854775807)
21 self.assertEqual(-(0x0), 0)
22 self.assertEqual(-(0x10), -16)
23 self.assertEqual(-(0x7fffffff), -2147483647)
[all …]
Dtest_fstring.py48 self.assertEqual(f'{y}', format(y))
49 self.assertEqual(f'{y}', 'class')
50 self.assertEqual(format(x), format(y))
55 self.assertEqual(x.__format__(''), 'class')
56 self.assertEqual(y.__format__(''), 'instance')
59 self.assertEqual(type(x).__format__(x, ''), 'class')
60 self.assertEqual(type(y).__format__(y, ''), 'class')
91 self.assertEqual(type(t), ast.Module)
92 self.assertEqual(len(t.body), 2)
94 self.assertEqual(type(t.body[0]), ast.Assign)
[all …]
Dtest_patma.py55 self.assertEqual(self.check_sequence_then_mapping(M1()), "map")
56 self.assertEqual(self.check_sequence_then_mapping(M2()), "map")
57 self.assertEqual(self.check_sequence_then_mapping(M3()), "map")
58 self.assertEqual(self.check_sequence_then_mapping(M4()), "map")
59 self.assertEqual(self.check_mapping_then_sequence(M1()), "map")
60 self.assertEqual(self.check_mapping_then_sequence(M2()), "map")
61 self.assertEqual(self.check_mapping_then_sequence(M3()), "map")
62 self.assertEqual(self.check_mapping_then_sequence(M4()), "map")
75 self.assertEqual(self.check_sequence_then_mapping(S1()), "seq")
76 self.assertEqual(self.check_sequence_then_mapping(S2()), "seq")
[all …]
Dtest_int.py35 self.assertEqual(int(314), 314)
36 self.assertEqual(int(3.14), 3)
38 self.assertEqual(int(-3.14), -3)
39 self.assertEqual(int(3.9), 3)
40 self.assertEqual(int(-3.9), -3)
41 self.assertEqual(int(3.5), 3)
42 self.assertEqual(int(-3.5), -3)
43 self.assertEqual(int("-3"), -3)
44 self.assertEqual(int(" -3 "), -3)
45 self.assertEqual(int("\N{EM SPACE}-3\N{EN SPACE}"), -3)
[all …]
Dtest_urlparse.py75 self.assertEqual(result, parsed)
78 self.assertEqual(t, parsed)
81 self.assertEqual(result2, url)
82 self.assertEqual(result2, result.geturl())
87 self.assertEqual(result3.geturl(), result.geturl())
88 self.assertEqual(result3, result)
89 self.assertEqual(result3.scheme, result.scheme)
90 self.assertEqual(result3.netloc, result.netloc)
91 self.assertEqual(result3.path, result.path)
92 self.assertEqual(result3.params, result.params)
[all …]
Dtest_memoryio.py31 self.assertEqual(buf[:1], bytesIo.read(1))
32 self.assertEqual(buf[1:5], bytesIo.read(4))
33 self.assertEqual(buf[5:], bytesIo.read(900))
34 self.assertEqual(self.EOF, bytesIo.read())
40 self.assertEqual(buf, bytesIo.read())
41 self.assertEqual(self.EOF, bytesIo.read())
49 self.assertEqual(buf, bytesIo.read())
52 self.assertEqual(buf[3:], bytesIo.read())
59 self.assertEqual(0, bytesIo.tell())
61 self.assertEqual(5, bytesIo.tell())
[all …]
Dtest_unicode.py67 self.assertEqual(realresult, result)
79 self.assertEqual(realresult, result)
83 self.assertEqual('\xff', '\u00ff')
84 self.assertEqual('\uffff', '\U0000ffff')
94 self.assertEqual(ascii('abc'), "'abc'")
95 self.assertEqual(ascii('ab\\c'), "'ab\\\\c'")
96 self.assertEqual(ascii('ab\\'), "'ab\\\\'")
97 self.assertEqual(ascii('\\c'), "'\\\\c'")
98 self.assertEqual(ascii('\\'), "'\\\\'")
99 self.assertEqual(ascii('\n'), "'\\n'")
[all …]
Dtest_audioop.py36 self.assertEqual(audioop.max(b'', w), 0)
37 self.assertEqual(audioop.max(bytearray(), w), 0)
38 self.assertEqual(audioop.max(memoryview(b''), w), 0)
40 self.assertEqual(audioop.max(p(5), w), 5)
41 self.assertEqual(audioop.max(p(5, -8, -1), w), 8)
42 self.assertEqual(audioop.max(p(maxvalues[w]), w), maxvalues[w])
43 self.assertEqual(audioop.max(p(minvalues[w]), w), -minvalues[w])
44 self.assertEqual(audioop.max(datas[w], w), -minvalues[w])
48 self.assertEqual(audioop.minmax(b'', w),
50 self.assertEqual(audioop.minmax(bytearray(), w),
[all …]
Dseq_tests.py127 self.assertEqual(len(v0), len(s))
131 self.assertEqual(len(vv), len(s))
137 self.assertEqual(self.type2test(g(s)), self.type2test(s))
138 self.assertEqual(self.type2test(IterFuncStop(s)), self.type2test())
139 self.assertEqual(self.type2test(c for c in "123"), self.type2test("123"))
145 self.assertEqual(self.type2test(LyingTuple((2,))), self.type2test((1,)))
146 self.assertEqual(self.type2test(LyingList([2])), self.type2test([1]))
155 self.assertEqual(u[i], i)
156 self.assertEqual(u[int(i)], i)
158 self.assertEqual(u[i], len(u)+i)
[all …]
Dtest_builtin.py143 self.assertEqual(type(itorg), type(it))
144 self.assertEqual(list(it), seq)
154 self.assertEqual(list(it), seq[1:])
176 self.assertEqual(abs(0), 0)
177 self.assertEqual(abs(1234), 1234)
178 self.assertEqual(abs(-1234), 1234)
181 self.assertEqual(abs(0.0), 0.0)
182 self.assertEqual(abs(3.14), 3.14)
183 self.assertEqual(abs(-3.14), 3.14)
187 self.assertEqual(abs(True), 1)
[all …]
Dtest_getargs2.py160 self.assertEqual(99, getargs_b(Index()))
161 self.assertEqual(0, getargs_b(IndexIntSubclass()))
164 self.assertEqual(1, getargs_b(BadIndex2()))
165 self.assertEqual(0, getargs_b(BadIndex3()))
167 self.assertEqual(0, getargs_b(IntSubclass()))
170 self.assertEqual(0, getargs_b(BadInt3()))
173 self.assertEqual(0, getargs_b(0))
174 self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX))
177 self.assertEqual(42, getargs_b(42))
184 self.assertEqual(99, getargs_B(Index()))
[all …]
Dtest_bytes.py51 self.assertEqual(type(b), self.type2test)
52 self.assertEqual(b.__class__, self.type2test)
58 self.assertEqual(a, b)
59 self.assertEqual(type(a), type(b))
63 self.assertEqual(len(b), 0)
78 self.assertEqual(len(b), 256)
79 self.assertEqual(list(b), list(range(256)))
83 self.assertEqual(b, b"*")
89 self.assertEqual(len(b), 256)
90 self.assertEqual(list(b), list(range(256)))
[all …]
Dtest_multibytecodec.py37 self.assertEqual(b''.decode(enc), '')
38 self.assertEqual(str(b'', enc), '')
39 self.assertEqual(''.encode(enc), b'')
43 self.assertEqual('abcd'.encode(enc), b'abcd')
57 self.assertEqual(data.encode(enc, "test.ignore"), b'')
84 self.assertEqual(encoder.encode('\ud30c\uc774\uc36c \ub9c8\uc744'),
86 self.assertEqual(encoder.reset(), None)
87 self.assertEqual(encoder.encode('\u2606\u223c\u2606', True),
89 self.assertEqual(encoder.reset(), None)
90 self.assertEqual(encoder.encode('', True), b'')
[all …]
Dtest_long.py156 eq = self.assertEqual
230 self.assertEqual(x, y)
233 eq = self.assertEqual
260 eq = self.assertEqual
273 eq = self.assertEqual
312 self.assertEqual(got, expected)
314 self.assertEqual(int(got, 0), x)
338 self.assertEqual(int(ss), vv)
350 self.assertEqual(int('1L', 22), 43)
353 self.assertEqual(int('000', 0), 0)
[all …]
Dtest_bigmem.py77 self.assertEqual(caps[-len(SUBSTR):],
79 self.assertEqual(caps.lstrip(_('-')), SUBSTR)
85 self.assertEqual(len(s), size)
89 self.assertEqual(s[lpadsize:-rpadsize], SUBSTR)
90 self.assertEqual(s.strip(), SUBSTR.strip())
97 self.assertEqual(s.count(_('.')), size)
99 self.assertEqual(s.count(_('.')), size + 1)
100 self.assertEqual(s.count(_(' ')), 3)
101 self.assertEqual(s.count(_('i')), 1)
102 self.assertEqual(s.count(_('j')), 0)
[all …]
Dtest_pathlib.py31 self.assertEqual(actual, expected)
34 self.assertEqual(actual, expected)
82 self.assertEqual(f(''), ('', '', ''))
83 self.assertEqual(f('a'), ('', '', 'a'))
84 self.assertEqual(f('a/b'), ('', '', 'a/b'))
85 self.assertEqual(f('a/b/'), ('', '', 'a/b/'))
86 self.assertEqual(f('/a'), ('', '/', 'a'))
87 self.assertEqual(f('/a/b'), ('', '/', 'a/b'))
88 self.assertEqual(f('/a/b/'), ('', '/', 'a/b/'))
92 self.assertEqual(f('//a'), ('', '//', 'a'))
[all …]
/third_party/python/Lib/test/test_email/
Dtest__header_value_parser.py14 self.assertEqual(x, ' \t')
15 self.assertEqual(str(x), '')
16 self.assertEqual(x.value, '')
17 self.assertEqual(x.token_type, 'fws')
24 self.assertEqual(str(tl), string)
25 self.assertEqual(tl.value, value)
27 self.assertEqual(rest, remainder)
29 self.assertEqual(tl.comments, comments)
55 self.assertEqual(parser._wsp_splitter('foo', 1), ['foo'])
58 self.assertEqual(parser._wsp_splitter('foo def', 1),
[all …]
Dtest_headerregistry.py87 self.assertEqual(h, 'this is a test')
88 self.assertEqual(str(h), 'this is a test')
92 self.assertEqual(h[5:7], 'is')
96 self.assertEqual(h.name, 'subject')
111 self.assertEqual(len(h.defects), 0)
115 self.assertEqual(len(h.defects), 1)
140 self.assertEqual(h, decoded)
142 self.assertEqual(h.fold(policy=policy.default), folded)
179 self.assertEqual(h, self.datestring)
180 self.assertEqual(h.datetime, self.dt)
[all …]
/third_party/protobuf/python/google/protobuf/internal/
Dwell_known_types_test.py68 self.assertEqual(text, message.ToJsonString())
71 self.assertEqual(message, parsed_message)
74 self.assertEqual(text, message.ToJsonString())
77 self.assertEqual(message, parsed_message)
109 self.assertEqual(0, message.seconds)
110 self.assertEqual(100000000, message.nanos)
113 self.assertEqual(8 * 3600, message.seconds)
114 self.assertEqual(0, message.nanos)
144 self.assertEqual(100000000, message.nanos)
146 self.assertEqual(100, message.nanos)
[all …]
/third_party/python/Lib/tkinter/test/test_tkinter/
Dtest_images.py75 self.assertEqual(str(image), '::img::test')
76 self.assertEqual(image.type(), 'bitmap')
77 self.assertEqual(image.width(), 16)
78 self.assertEqual(image.height(), 16)
90 self.assertEqual(str(image), '::img::test')
91 self.assertEqual(image.type(), 'bitmap')
92 self.assertEqual(image.width(), 16)
93 self.assertEqual(image.height(), 16)
101 self.assertEqual(self.root.splitlist(actual), expected)
105 self.assertEqual(image['data'], '-data {} {} {} {}')
[all …]
Dtest_geometry_managers.py37 self.assertEqual(pack.pack_slaves(), [a, b, c, d])
39 self.assertEqual(pack.pack_slaves(), [b, a, c, d])
41 self.assertEqual(pack.pack_slaves(), [b, a, c, d])
49 self.assertEqual(a.winfo_geometry(), geom)
70 self.assertEqual(pack.pack_slaves(), [a, b, c, d])
72 self.assertEqual(pack.pack_slaves(), [b, c, a, d])
74 self.assertEqual(pack.pack_slaves(), [b, c, a, d])
80 self.assertEqual(a.winfo_geometry(), geoms[0])
81 self.assertEqual(b.winfo_geometry(), geoms[1])
82 self.assertEqual(c.winfo_geometry(), geoms[2])
[all …]
/third_party/mbedtls/tests/scripts/
Dtest_generate_test_code.py56 self.assertEqual(preprocessor1, '#if defined(DEP1)',
58 self.assertEqual(preprocessor2, '#if defined(DEP2)',
60 self.assertEqual(endif1, '#endif /* DEP2 */',
62 self.assertEqual(endif2, '#endif /* DEP1 */',
75 self.assertEqual(preprocessor1, '#if !defined(DEP1)',
77 self.assertEqual(preprocessor2, '#if !defined(DEP2)',
79 self.assertEqual(endif1, '#endif /* !DEP2 */',
81 self.assertEqual(endif2, '#endif /* !DEP1 */',
94 self.assertEqual(preprocessor1, '#if !defined(DEP1)',
96 self.assertEqual(preprocessor2, '#if defined(DEP2)',
[all …]
/third_party/python/Lib/ctypes/test/
Dtest_buffers.py9 self.assertEqual(len(b), 32)
10 self.assertEqual(sizeof(b), 32 * sizeof(c_char))
14 self.assertEqual(len(b), 4) # trailing nul char
15 self.assertEqual(sizeof(b), 4 * sizeof(c_char))
17 self.assertEqual(b[0], b"a")
18 self.assertEqual(b[:], b"abc\0")
19 self.assertEqual(b[::], b"abc\0")
20 self.assertEqual(b[::-1], b"\0cba")
21 self.assertEqual(b[::2], b"ac")
22 self.assertEqual(b[::5], b"a")
[all …]
Dtest_structures.py26 self.assertEqual(sizeof(X), sizeof(c_int))
27 self.assertEqual(sizeof(Y), sizeof(c_int)*2)
28 self.assertEqual(sizeof(Z), sizeof(c_int))
29 self.assertEqual(X._fields_, [("a", c_int)])
30 self.assertEqual(Y._fields_, [("b", c_int)])
31 self.assertEqual(Z._fields_, [("a", c_int)])
36 self.assertEqual(sizeof(X), 0)
41 self.assertEqual(sizeof(Y), sizeof(X))
47 self.assertEqual(sizeof(X), sizeof(c_int))
48 self.assertEqual(sizeof(Y), sizeof(c_int)*2)
[all …]
/third_party/python/Lib/unittest/test/testmock/
Dtestwith.py20 self.assertEqual(something, sentinel.Something2, "unpatched")
21 self.assertEqual(something, sentinel.Something)
27 self.assertEqual(something, sentinel.Something2, "unpatched")
29 self.assertEqual(something, sentinel.Something)
34 self.assertEqual(something, mock_something, "unpatched")
37 self.assertEqual(something, sentinel.Something)
46 self.assertEqual(Foo.something, original)
52 self.assertEqual(something, mock_something, "unpatched")
53 self.assertEqual(something_else, mock_something_else,
56 self.assertEqual(something, sentinel.Something)
[all …]

12345678910>>...34