Home
last modified time | relevance | path

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

12345678910>>...110

/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 …]
Dtest_builtin.py79 self.assertEqual(abs(0), 0)
80 self.assertEqual(abs(1234), 1234)
81 self.assertEqual(abs(-1234), 1234)
84 self.assertEqual(abs(0.0), 0.0)
85 self.assertEqual(abs(3.14), 3.14)
86 self.assertEqual(abs(-3.14), 3.14)
88 self.assertEqual(abs(0L), 0L)
89 self.assertEqual(abs(1234L), 1234L)
90 self.assertEqual(abs(-1234L), 1234L)
94 self.assertEqual(abs(True), 1)
[all …]
Dtest_getargs2.py134 self.assertEqual(99, getargs_b(Long()))
135 self.assertEqual(99, getargs_b(Int()))
138 self.assertEqual(0, getargs_b(0))
139 self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX))
142 self.assertEqual(42, getargs_b(42))
143 self.assertEqual(42, getargs_b(42L))
150 self.assertEqual(99, getargs_B(Long()))
151 self.assertEqual(99, getargs_B(Int()))
153 self.assertEqual(UCHAR_MAX, getargs_B(-1))
154 self.assertEqual(UCHAR_MAX, getargs_B(-1L))
[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.py35 self.assertEqual(f'{y}', format(y))
36 self.assertEqual(f'{y}', 'class')
37 self.assertEqual(format(x), format(y))
42 self.assertEqual(x.__format__(''), 'class')
43 self.assertEqual(y.__format__(''), 'instance')
46 self.assertEqual(type(x).__format__(x, ''), 'class')
47 self.assertEqual(type(y).__format__(y, ''), 'class')
78 self.assertEqual(type(t), ast.Module)
79 self.assertEqual(len(t.body), 2)
81 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_macpath.py15 self.assertEqual(macpath.abspath("xx:yy"), "xx:yy")
37 self.assertEqual(split("foo:bar"),
39 self.assertEqual(split("conky:mountpoint:foo:bar"),
42 self.assertEqual(split(":"), ('', ''))
43 self.assertEqual(split(":conky:mountpoint:"),
46 self.assertEqual(split(b"foo:bar"),
48 self.assertEqual(split(b"conky:mountpoint:foo:bar"),
51 self.assertEqual(split(b":"), (b'', b''))
52 self.assertEqual(split(b":conky:mountpoint:"),
57 self.assertEqual(join('a', 'b'), ':a:b')
[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_unicode.py59 self.assertEqual(realresult, result)
71 self.assertEqual(realresult, result)
75 self.assertEqual('\xff', '\u00ff')
76 self.assertEqual('\uffff', '\U0000ffff')
86 self.assertEqual(ascii('abc'), "'abc'")
87 self.assertEqual(ascii('ab\\c'), "'ab\\\\c'")
88 self.assertEqual(ascii('ab\\'), "'ab\\\\'")
89 self.assertEqual(ascii('\\c'), "'\\\\c'")
90 self.assertEqual(ascii('\\'), "'\\\\'")
91 self.assertEqual(ascii('\n'), "'\\n'")
[all …]
Dtest_getargs2.py137 self.assertEqual(99, getargs_b(Int()))
138 self.assertEqual(0, getargs_b(IntSubclass()))
141 self.assertEqual(1, getargs_b(BadInt2()))
142 self.assertEqual(0, getargs_b(BadInt3()))
145 self.assertEqual(0, getargs_b(0))
146 self.assertEqual(UCHAR_MAX, getargs_b(UCHAR_MAX))
149 self.assertEqual(42, getargs_b(42))
156 self.assertEqual(99, getargs_B(Int()))
157 self.assertEqual(0, getargs_B(IntSubclass()))
160 self.assertEqual(1, getargs_B(BadInt2()))
[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 …]
/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.py61 self.assertEqual(len(w), 1)
62 self.assertEqual(w[-1].category, UserWarning)
64 self.assertEqual(parser.glyphNames_, {'a', 'b', 'c'})
82 self.assertEqual(type(c1), ast.Comment)
83 self.assertEqual(c1.text, "# Initial")
84 self.assertEqual(str(c1), "# Initial")
85 self.assertEqual(type(c2), ast.Comment)
86 self.assertEqual(c2.text, "# simple")
87 self.assertEqual(doc.statements[1].name, "test")
94 self.assertEqual(type(c1), ast.Comment)
[all …]
/external/fonttools/Tests/ttLib/tables/
DTupleVariation_test.py75 self.assertEqual(var1, var2)
108 self.assertEqual([
119 self.assertEqual([
135 self.assertEqual([
152 self.assertEqual([
176 self.assertEqual(AXES, g.axes)
177 self.assertEqual([None, 42, -23, None], g.coordinates)
188 self.assertEqual(AXES, g.axes)
189 self.assertEqual([None, (33, 44), (-2, 170), None], g.coordinates)
201 self.assertEqual("00 08 00 77", hexencode(tup))
[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/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/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/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/tensorflow/tensorflow/python/debug/cli/
Ddebugger_cli_common_test.py44 self.assertEqual({"foo": "bar"}, exit_exc.exit_token)
58 self.assertEqual(2, len(screen_output.lines))
59 self.assertEqual(2, len(screen_output.font_attr_segs))
60 self.assertEqual(1, len(screen_output.font_attr_segs[0]))
61 self.assertEqual(1, len(screen_output.font_attr_segs[1]))
62 self.assertEqual(2, len(screen_output.annotations))
64 self.assertEqual(2, screen_output.num_lines())
78 self.assertEqual(1, len(screen_output.lines))
79 self.assertEqual(1, len(screen_output.font_attr_segs))
80 self.assertEqual(1, len(screen_output.font_attr_segs[0]))
[all …]
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 …]

12345678910>>...110