Home
last modified time | relevance | path

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

12345678910>>...121

/external/python/cpython2/Lib/test/
Dtest_int_literal.py14 self.assertEqual(0x0, 0X0)
15 self.assertEqual(0x1, 0X1)
16 self.assertEqual(0x123456789abcdef, 0X123456789abcdef)
18 self.assertEqual(0x0, 0)
19 self.assertEqual(0x10, 16)
20 self.assertEqual(0x7fffffff, 2147483647)
21 self.assertEqual(0x7fffffffffffffff, 9223372036854775807)
23 self.assertEqual(-(0x0), 0)
24 self.assertEqual(-(0x10), -16)
25 self.assertEqual(-(0x7fffffff), -2147483647)
[all …]
Dtest_int.py59 self.assertEqual(self.ntype(), 0)
63 self.assertEqual(self.ntype(x=1.2), 1)
64 self.assertEqual(self.ntype('100', base=2), 4)
65 self.assertEqual(self.ntype(x='100', base=2), 4)
74 self.assertEqual(int(314), 314)
75 self.assertEqual(int(3.14), 3)
76 self.assertEqual(int(314L), 314)
78 self.assertEqual(int(-3.14), -3)
79 self.assertEqual(int(3.9), 3)
80 self.assertEqual(int(-3.9), -3)
[all …]
Dtest_str.py24 self.assertEqual(str(''), '')
25 self.assertEqual(str(0), '0')
26 self.assertEqual(str(0L), '0')
27 self.assertEqual(str(()), '()')
28 self.assertEqual(str([]), '[]')
29 self.assertEqual(str({}), '{}')
32 self.assertEqual(str(a), '[[...]]')
35 self.assertEqual(str(a), '{0: {...}}')
105 self.assertEqual(str(Foo1()), "foo")
106 self.assertEqual(str(Foo2()), "foo")
[all …]
Dtest_memoryio.py27 self.assertEqual(buf[:1], bytesIo.read(1))
28 self.assertEqual(buf[1:5], bytesIo.read(4))
29 self.assertEqual(buf[5:], bytesIo.read(900))
30 self.assertEqual(self.EOF, bytesIo.read())
36 self.assertEqual(buf, bytesIo.read())
37 self.assertEqual(self.EOF, bytesIo.read())
45 self.assertEqual(buf, bytesIo.read())
48 self.assertEqual(buf[3:], bytesIo.read())
55 self.assertEqual(0, bytesIo.tell())
57 self.assertEqual(5, bytesIo.tell())
[all …]
/external/python/cpython3/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_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.py87 self.assertEqual(result, parsed)
90 self.assertEqual(t, parsed)
93 self.assertEqual(result2, url)
94 self.assertEqual(result2, result.geturl())
99 self.assertEqual(result3.geturl(), result.geturl())
100 self.assertEqual(result3, result)
101 self.assertEqual(result3.scheme, result.scheme)
102 self.assertEqual(result3.netloc, result.netloc)
103 self.assertEqual(result3.path, result.path)
104 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_getargs2.py158 self.assertEqual(99, getargs_b(Index()))
159 self.assertEqual(0, getargs_b(IndexIntSubclass()))
162 self.assertEqual(1, getargs_b(BadIndex2()))
163 self.assertEqual(0, getargs_b(BadIndex3()))
165 self.assertEqual(99, getargs_b(Int()))
166 self.assertEqual(0, getargs_b(IntSubclass()))
169 self.assertEqual(1, getargs_b(BadInt2()))
170 self.assertEqual(0, getargs_b(BadInt3()))
173 self.assertEqual(0, getargs_b(0))
174 self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX))
[all …]
Dtest_unicode.py62 self.assertEqual(realresult, result)
74 self.assertEqual(realresult, result)
78 self.assertEqual('\xff', '\u00ff')
79 self.assertEqual('\uffff', '\U0000ffff')
89 self.assertEqual(ascii('abc'), "'abc'")
90 self.assertEqual(ascii('ab\\c'), "'ab\\\\c'")
91 self.assertEqual(ascii('ab\\'), "'ab\\\\'")
92 self.assertEqual(ascii('\\c'), "'\\\\c'")
93 self.assertEqual(ascii('\\'), "'\\\\'")
94 self.assertEqual(ascii('\n'), "'\\n'")
[all …]
/external/toolchain-utils/crosperf/
Dsettings_factory_unittest.py23 self.assertEqual(len(res.fields), 7)
24 self.assertEqual(res.GetField('test_name'), '')
25 self.assertEqual(res.GetField('test_args'), '')
26 self.assertEqual(res.GetField('iterations'), 0)
27 self.assertEqual(res.GetField('suite'), 'test_that')
36 self.assertEqual(len(res.fields), 10)
37 self.assertEqual(res.GetField('chromeos_image'), '')
38 self.assertEqual(res.GetField('autotest_path'), '')
39 self.assertEqual(res.GetField('chromeos_root'), '')
40 self.assertEqual(res.GetField('remote'), None)
[all …]
/external/python/asn1crypto/tests/
Dtest_cms.py36 self.assertEqual('v1', data['version'].native)
37 self.assertEqual(
41 self.assertEqual(
57 self.assertEqual('v2', data['version'].native)
58 self.assertEqual(
62 self.assertEqual(
72 self.assertEqual(
76 self.assertEqual(
87 self.assertEqual(
91 self.assertEqual(
[all …]
Dtest_core.py286 self.assertEqual(b'\x1f\x1f\x00', v.dump())
289 self.assertEqual(b'\x1f\x24\x00', v.dump())
298 self.assertEqual(b'\x7f\x49\x00', v.dump())
307 self.assertEqual(b'\x7f\x81\x49\x00', v.dump())
316 self.assertEqual(b'\x7f\x81\x80\x00\x00', v.dump())
325 self.assertEqual(b'\x61\x00', v.dump())
330 self.assertEqual(core.Integer, seq.spec('value'))
332 self.assertEqual(core.OctetString, seq.spec('value'))
336 self.assertEqual(core.Any, seq.spec())
359 self.assertEqual(one, two)
[all …]
Dtest_keys.py31 self.assertEqual(
35 self.assertEqual(
39 self.assertEqual(
43 self.assertEqual(
47 self.assertEqual(
51 self.assertEqual(
55 self.assertEqual(
59 self.assertEqual(
63 self.assertEqual(
67 self.assertEqual(
[all …]
/external/python/cpython3/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 …]
/external/fonttools/Tests/feaLib/
Dparser_test.py68 self.assertEqual(len(w), 1)
69 self.assertEqual(w[-1].category, UserWarning)
71 self.assertEqual(parser.glyphNames_, {'a', 'b', 'c'})
89 self.assertEqual(type(c1), ast.Comment)
90 self.assertEqual(c1.text, "# Initial")
91 self.assertEqual(str(c1), "# Initial")
92 self.assertEqual(type(c2), ast.Comment)
93 self.assertEqual(c2.text, "# simple")
94 self.assertEqual(doc.statements[1].name, "test")
101 self.assertEqual(type(c1), ast.Comment)
[all …]
/external/python/cpython2/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], "a")
18 self.assertEqual(b[:], "abc\0")
19 self.assertEqual(b[::], "abc\0")
20 self.assertEqual(b[::-1], "\0cba")
21 self.assertEqual(b[::2], "ac")
22 self.assertEqual(b[::5], "a")
[all …]
/external/autotest/client/cros/cellular/mbim_compliance/
Dmbim_message_unittest.py75 self.assertEqual(message.message_length, 0)
76 self.assertEqual(message.transaction_id, 0)
77 self.assertEqual(message.message_type, 3)
87 self.assertEqual(message.message_length, 0)
88 self.assertEqual(message.transaction_id, 4)
89 self.assertEqual(message.message_type, 3)
116 self.assertEqual(message.payload_buffer, array.array('B', [0x50, 0x40]))
127 self.assertEqual(True, isinstance(message,
129 self.assertEqual(message.message_type, mbim_constants.MBIM_OPEN_DONE)
130 self.assertEqual(message.message_length, 16)
[all …]
/external/python/cpython2/Lib/lib-tk/test/test_tkinter/
Dtest_images.py34 self.assertEqual(str(image), '::img::test')
35 self.assertEqual(image.type(), 'bitmap')
36 self.assertEqual(image.width(), 16)
37 self.assertEqual(image.height(), 16)
48 self.assertEqual(str(image), '::img::test')
49 self.assertEqual(image.type(), 'bitmap')
50 self.assertEqual(image.width(), 16)
51 self.assertEqual(image.height(), 16)
58 self.assertEqual(self.root.splitlist(actual), expected)
62 self.assertEqual(image['data'], '-data {} {} {} {}')
[all …]
/external/selinux/python/sepolgen/tests/
Dtest_audit.py75 self.assertEqual(avc.scontext, sc)
76 self.assertEqual(avc.tcontext, sc)
77 self.assertEqual(avc.tclass, "")
78 self.assertEqual(avc.accesses, [])
79 self.assertEqual(avc.ioctlcmd, None)
85 self.assertEqual(avc.scontext.user, "user_u")
86 self.assertEqual(avc.scontext.role, "system_r")
87 self.assertEqual(avc.scontext.type, "unconfined_t")
88 self.assertEqual(avc.scontext.level, "s0")
90 self.assertEqual(avc.tcontext.user, "user_u")
[all …]
/external/python/cpython3/Lib/tkinter/test/test_tkinter/
Dtest_images.py33 self.assertEqual(str(image), '::img::test')
34 self.assertEqual(image.type(), 'bitmap')
35 self.assertEqual(image.width(), 16)
36 self.assertEqual(image.height(), 16)
47 self.assertEqual(str(image), '::img::test')
48 self.assertEqual(image.type(), 'bitmap')
49 self.assertEqual(image.width(), 16)
50 self.assertEqual(image.height(), 16)
57 self.assertEqual(self.root.splitlist(actual), expected)
61 self.assertEqual(image['data'], '-data {} {} {} {}')
[all …]
/external/tensorflow/tensorflow/python/debug/cli/
Dcurses_widgets_test.py42 self.assertEqual(0, nav_history.size())
57 self.assertEqual(1, nav_history.size())
58 self.assertEqual(0, nav_history.pointer())
64 self.assertEqual("foo", output.command)
65 self.assertEqual(["bar"], output.screen_output.lines)
66 self.assertEqual(0, output.scroll_position)
73 self.assertEqual(2, nav_history.size())
74 self.assertEqual(1, nav_history.pointer())
80 self.assertEqual(2, nav_history.size())
81 self.assertEqual(1, nav_history.pointer())
[all …]
Dcli_shared_test.py36 self.assertEqual(str(None), cli_shared.bytes_to_readable_str(None))
39 self.assertEqual("0", cli_shared.bytes_to_readable_str(0))
40 self.assertEqual("500", cli_shared.bytes_to_readable_str(500))
41 self.assertEqual("1023", cli_shared.bytes_to_readable_str(1023))
44 self.assertEqual("1.00k", cli_shared.bytes_to_readable_str(1024))
45 self.assertEqual("2.40k", cli_shared.bytes_to_readable_str(int(1024 * 2.4)))
46 self.assertEqual("1023.00k", cli_shared.bytes_to_readable_str(1024 * 1023))
49 self.assertEqual("1.00M", cli_shared.bytes_to_readable_str(1024**2))
50 self.assertEqual("2.40M",
52 self.assertEqual("1023.00M",
[all …]
/external/fonttools/Tests/
Dagl_test.py8 self.assertEqual(agl.toUnicode("Lcommaaccent"), "Ļ")
9 self.assertEqual(agl.toUnicode("uni20AC0308"), "\u20AC\u0308")
10 self.assertEqual(agl.toUnicode("u1040C"), "\U0001040C")
11 self.assertEqual(agl.toUnicode("uniD801DC0C"), "")
12 self.assertEqual(agl.toUnicode("uni20ac"), "")
13 self.assertEqual(
16 self.assertEqual(agl.toUnicode("Lcommaaccent_uni013B_u013B"), "ĻĻĻ")
17 self.assertEqual(agl.toUnicode("foo"), "")
18 self.assertEqual(agl.toUnicode(".notdef"), "")
21 self.assertEqual(agl.toUnicode("longs_t"), "ſt")
[all …]

12345678910>>...121