Home
last modified time | relevance | path

Searched refs:assertTrue (Results 1 – 25 of 241) sorted by relevance

12345678910

/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
Dtest_strop.py13 self.assertTrue(strop.atoi(" 1 ") == 1)
18 self.assertTrue(strop.atol(" 1 ") == 1L)
23 self.assertTrue(strop.atof(" 1 ") == 1.0)
28 self.assertTrue(strop.capitalize(" hello ") == " hello ")
29 self.assertTrue(strop.capitalize("hello ") == "Hello ")
32 self.assertTrue(strop.find("abcdefghiabc", "abc") == 0)
33 self.assertTrue(strop.find("abcdefghiabc", "abc", 1) == 9)
34 self.assertTrue(strop.find("abcdefghiabc", "def", 4) == -1)
37 self.assertTrue(strop.rfind("abcdefghiabc", "abc") == 9)
40 self.assertTrue(strop.lower("HeLLo") == "hello")
[all …]
Dtest_unary.py9 self.assertTrue(-2 == 0 - 2)
10 self.assertTrue(-0 == 0)
11 self.assertTrue(--2 == 2)
12 self.assertTrue(-2L == 0 - 2L)
13 self.assertTrue(-2.0 == 0 - 2.0)
14 self.assertTrue(-2j == 0 - 2j)
17 self.assertTrue(+2 == 2)
18 self.assertTrue(+0 == 0)
19 self.assertTrue(++2 == 2)
20 self.assertTrue(+2L == 2L)
[all …]
Dtest_stringprep.py11 self.assertTrue(in_table_a1(u"\u0221"))
14 self.assertTrue(in_table_b1(u"\u00ad"))
17 self.assertTrue(map_table_b2(u"\u0041"), u"\u0061")
18 self.assertTrue(map_table_b2(u"\u0061"), u"\u0061")
20 self.assertTrue(map_table_b3(u"\u0041"), u"\u0061")
21 self.assertTrue(map_table_b3(u"\u0061"), u"\u0061")
23 self.assertTrue(in_table_c11(u"\u0020"))
26 self.assertTrue(in_table_c12(u"\u00a0"))
29 self.assertTrue(in_table_c12(u"\u00a0"))
32 self.assertTrue(in_table_c11_c12(u"\u00a0"))
[all …]
Dtest_operator.py43 self.assertTrue(operator.lt(1, 2))
44 self.assertTrue(operator.lt(1, 2.0))
51 self.assertTrue(operator.le(1, 1))
52 self.assertTrue(operator.le(1, 1.0))
53 self.assertTrue(operator.le(1, 2))
54 self.assertTrue(operator.le(1, 2.0))
65 self.assertTrue(operator.eq(1, 1))
66 self.assertTrue(operator.eq(1, 1.0))
76 self.assertTrue(operator.ne(1, 0))
77 self.assertTrue(operator.ne(1, 0.0))
[all …]
Dtest_undocumented_details.py7 self.assertTrue(str < int or str > int)
8 self.assertTrue(int <= str or int >= str)
9 self.assertTrue(cmp(int, str) != 0)
10 self.assertTrue(int is int)
11 self.assertTrue(str == str)
12 self.assertTrue(int != str)
26 self.assertTrue(h_cell < g_cell)
27 self.assertTrue(g_cell >= h_cell)
29 self.assertTrue(g_cell is g_cell)
30 self.assertTrue(g_cell == g_cell)
[all …]
Dtest_exception_variations.py20 self.assertTrue(hit_except)
21 self.assertTrue(hit_finally)
39 self.assertTrue(hit_finally)
40 self.assertTrue(hit_else)
53 self.assertTrue(hit_except)
54 self.assertTrue(hit_finally)
68 self.assertTrue(hit_finally)
78 self.assertTrue(hit_except)
102 self.assertTrue(hit_except)
116 self.assertTrue(hit_else)
[all …]
Dtest_abc.py18 self.assertTrue(foo.__isabstractmethod__)
25 self.assertTrue(foo.__isabstractmethod__)
47 self.assertTrue(isabstract(C))
52 self.assertTrue(isabstract(D))
63 self.assertTrue(isabstract(F))
79 self.assertTrue(isinstance(OldstyleClass, type(OldstyleClass)))
95 self.assertTrue(issubclass(B, A))
96 self.assertTrue(issubclass(B, (A,)))
102 self.assertTrue(issubclass(C, A))
103 self.assertTrue(issubclass(C, (A,)))
[all …]
Dtest_symtable.py68 self.assertTrue(self.spam.is_optimized())
71 self.assertTrue(self.foo.has_exec())
72 self.assertTrue(self.foo.has_import_star())
78 self.assertTrue(self.internal.is_nested())
81 self.assertTrue(self.top.has_children())
82 self.assertTrue(self.Mine.has_children())
98 self.assertTrue(self.spam.lookup("glob").is_global())
100 self.assertTrue(self.spam.lookup("bar").is_global())
101 self.assertTrue(self.spam.lookup("bar").is_declared_global())
106 self.assertTrue(self.spam.lookup("x").is_local())
[all …]
Dtest_filecmp.py28 self.assertTrue(filecmp.cmp(self.name, self.name_same),
30 self.assertTrue(filecmp.cmp(self.name, self.name_same, shallow=False),
32 self.assertTrue(filecmp.cmp(self.name, self.name, shallow=False),
34 self.assertTrue(filecmp.cmp(self.name, self.name),
72 self.assertTrue(filecmp.cmpfiles(self.dir, self.dir, ['file']) ==
75 self.assertTrue(filecmp.cmpfiles(self.dir, self.dir_same, ['file']) ==
80 self.assertTrue(filecmp.cmpfiles(self.dir, self.dir, ['file'],
84 self.assertTrue(filecmp.cmpfiles(self.dir, self.dir_same, ['file'],
106 self.assertTrue(d.common == ['file'])
107 self.assertTrue(d.left_only == d.right_only == [])
[all …]
Dtest_old_mailbox.py68 self.assertTrue(len(self.mbox) == 0)
69 self.assertTrue(self.mbox.next() is None)
70 self.assertTrue(self.mbox.next() is None)
75 self.assertTrue(len(self.mbox) == 1)
76 self.assertTrue(self.mbox.next() is not None)
77 self.assertTrue(self.mbox.next() is None)
78 self.assertTrue(self.mbox.next() is None)
83 self.assertTrue(len(self.mbox) == 1)
84 self.assertTrue(self.mbox.next() is not None)
85 self.assertTrue(self.mbox.next() is None)
[all …]
Dtest_weakref.py73 self.assertTrue(ref1() is None,
75 self.assertTrue(ref2() is None,
77 self.assertTrue(self.cbcalled == 2,
111 self.assertTrue(self.cbcalled == 2)
116 self.assertTrue(ref() is not None,
119 self.assertTrue(o is o2,
127 self.assertTrue(self.cbcalled == 1,
129 self.assertTrue(ref() is None,
139 self.assertTrue(ref1 is ref2,
146 self.assertTrue(ref1 is ref2,
[all …]
Dtest_copy.py15 self.assertTrue(copy.Error is copy.error)
16 self.assertTrue(issubclass(copy.Error, Exception))
57 self.assertTrue(y is x)
65 self.assertTrue(y is x)
89 self.assertTrue(copy.copy(x) is x, repr(x))
183 self.assertTrue(y is not x)
184 self.assertTrue(y[0] is not x[0])
185 self.assertTrue(y[0] is y[1])
230 self.assertTrue(y is x)
238 self.assertTrue(y is x)
[all …]
Dtest_cookielib.py29 self.assertTrue(re.search(r"^\d{4}-\d\d-\d\d \d\d:\d\d:\d\dZ$", text),
82 self.assertTrue(t == t2 == t3 == test_t,
100 self.assertTrue(http2time(test) is None,
369 if ok: self.assertTrue(r)
370 else: self.assertTrue(not r)
382 self.assertTrue(cookie.value is None)
385 self.assertTrue(cookie.value is None)
429 self.assertTrue(version is None) # didn't expect a stored cookie
453 self.assertTrue(cookie.domain_specified)
455 self.assertTrue(not cookie.port_specified)
[all …]
Dtest_functools.py108 self.assertTrue(expected == got and empty == {})
116 self.assertTrue(expected == got and empty == ())
122 self.assertTrue(args1 == (0,1) and kw1 == {'a':1,'b':2})
124 self.assertTrue(args2 == (0,) and kw2 == {'a':1})
175 self.assertTrue(getattr(wrapper, name) is getattr(wrapped, name))
181 self.assertTrue(wrapped_attr[key] is wrapper_attr[key])
241 self.assertTrue(wrapper.__doc__.startswith('max('))
366 self.assertTrue(A(1) < A(2))
367 self.assertTrue(A(2) > A(1))
368 self.assertTrue(A(1) <= A(2))
[all …]
Dtest_dummy_thread.py27 self.assertTrue(not self.lock.locked(),
34 self.assertTrue(not self.lock.locked(),
43 self.assertTrue(self.lock.acquire(0),
49 self.assertTrue(not self.lock.acquire(0),
56 self.assertTrue(self.lock.locked(),
61 self.assertTrue(self.lock.acquire(1) is True,
63 self.assertTrue(self.lock.acquire() is True)
83 self.assertTrue((end_time - start_time) >= DELAY,
97 self.assertTrue(_thread.get_ident() != 0,
131 self.assertTrue(result[0] and result[1],
[all …]
Dtest_strptime.py41 self.assertTrue(comparison == strftime_output,
68 self.assertTrue(strftime_output == self.LT_ins.am_pm[position],
75 self.assertTrue(timezone in self.LT_ins.timezone[0] or
89 self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date_time,
93 self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date,
97 self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_time,
102 self.assertTrue(LT.LC_time, "LocaleTime's LC directives cannot handle "
122 self.assertTrue(pattern_string.find(self.locale_time.a_weekday[2]) != -1,
125 self.assertTrue(pattern_string.find(self.locale_time.f_weekday[4]) != -1,
128 self.assertTrue(pattern_string.find(self.time_re['d']) != -1,
[all …]
Dtest_rfc822.py19 self.assertTrue(msg.get("to") == '"last, first" <userid@foo.net>')
20 self.assertTrue(msg.get("TO") == '"last, first" <userid@foo.net>')
21 self.assertTrue(msg.get("No-Such-Header") is None)
22 self.assertTrue(msg.get("No-Such-Header", "No-Such-Value")
28 self.assertTrue(not msg.has_key("New-Header"))
29 self.assertTrue(msg.setdefault("New-Header", "New-Value") == "New-Value")
30 self.assertTrue(msg.setdefault("New-Header", "Different-Value")
32 self.assertTrue(msg["new-header"] == "New-Value")
34 self.assertTrue(msg.setdefault("Another-Header") == "")
35 self.assertTrue(msg["another-header"] == "")
Dtest_traceback.py41 self.assertTrue(len(err) == 4)
42 self.assertTrue(err[1].strip() == "return x!")
44 self.assertTrue(err[1].find("!") == err[2].find("^")) # in the right place
49 self.assertTrue(err[2].count('\n') == 1) # and no additional newline
50 self.assertTrue(err[1].find("+") == err[2].find("^")) # in the right place
58 self.assertTrue(len(err) == 3)
59 self.assertTrue(err[1].strip() == "[x for x in x] = x")
64 self.assertTrue(len(err) == 4)
65 self.assertTrue(err[1].strip() == "print 2")
67 self.assertTrue(err[1].find("2") == err[2].find("^"))
[all …]
Dtest_urllib2net.py85 self.assertTrue(abused_fileobject.__class__ is socket._fileobject)
87 self.assertTrue(httpresponse.__class__ is httplib.HTTPResponse)
89 self.assertTrue(fileobject.__class__ is socket._fileobject)
91 self.assertTrue(not fileobject.closed)
93 self.assertTrue(fileobject.closed)
183 self.assertTrue(request.header_items())
184 self.assertTrue(request.has_header('User-agent'))
242 self.assertTrue(socket.getdefaulttimeout() is None)
246 self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None)
249 self.assertTrue(socket.getdefaulttimeout() is None)
[all …]
Dtest_unicode_file.py45 self.assertTrue(os.path.exists(filename))
46 self.assertTrue(os.path.isfile(filename))
47 self.assertTrue(os.access(filename, os.R_OK))
48 self.assertTrue(os.path.exists(os.path.abspath(filename)))
49 self.assertTrue(os.path.isfile(os.path.abspath(filename)))
50 self.assertTrue(os.access(os.path.abspath(filename), os.R_OK))
57 self.assertTrue(
82 self.assertTrue(type(filename1)!=type(filename2),
95 self.assertTrue(os.path.isfile(filename1)) # must exist.
97 self.assertTrue(os.path.isfile(filename1+".new"))
[all …]
Dtest_fractions.py400 self.assertTrue(F(1, 2) < F(2, 3))
402 self.assertTrue(F(1, 2) <= F(2, 3))
403 self.assertTrue(F(1, 2) <= F(1, 2))
405 self.assertTrue(F(1, 2) == F(1, 2))
408 self.assertTrue(F(1, 2) != F(1, 3))
411 self.assertTrue(F(1, 2) == DummyRational(1, 2))
412 self.assertTrue(DummyRational(1, 2) == F(1, 2))
416 self.assertTrue(F(1, 2) < DummyRational(3, 4))
421 self.assertTrue(F(1, 2) > DummyRational(1, 7))
422 self.assertTrue(F(1, 2) <= DummyRational(3, 4))
[all …]
Dtest_quopri.py133 self.assertTrue(quopri.encodestring(p) == e)
138 self.assertTrue(quopri.decodestring(e) == p)
143 self.assertTrue(quopri.decodestring(quopri.encodestring(e)) == e)
151 self.assertTrue(outfp.getvalue() == e)
159 self.assertTrue(outfp.getvalue() == p)
164 self.assertTrue(quopri.encodestring(p, quotetabs=True) == e)
165 self.assertTrue(quopri.decodestring(e) == p)
170 self.assertTrue(quopri.encodestring(p, header=True) == e)
175 self.assertTrue(quopri.decodestring(e, header=True) == p)
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/
Dtest_util.py36 self.assertTrue(self.is_tuple("(a, b)"))
37 self.assertTrue(self.is_tuple("(a, (b, c))"))
38 self.assertTrue(self.is_tuple("((a, (b, c)),)"))
39 self.assertTrue(self.is_tuple("(a,)"))
40 self.assertTrue(self.is_tuple("()"))
52 self.assertTrue(self.is_list("[]"))
53 self.assertTrue(self.is_list("[a]"))
54 self.assertTrue(self.is_list("[a, b]"))
55 self.assertTrue(self.is_list("[a, [b, c]]"))
56 self.assertTrue(self.is_list("[[a, [b, c]],]"))
[all …]
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/
Dtest_dist.py100 self.assertTrue(isinstance(cmd, test_dist))
259 self.assertTrue("Metadata-Version: 1.0" in meta)
260 self.assertTrue("provides:" not in meta.lower())
261 self.assertTrue("requires:" not in meta.lower())
262 self.assertTrue("obsoletes:" not in meta.lower())
274 self.assertTrue("Metadata-Version: 1.1" in meta)
275 self.assertTrue("requires:" not in meta.lower())
276 self.assertTrue("obsoletes:" not in meta.lower())
294 self.assertTrue("Metadata-Version: 1.1" in meta)
295 self.assertTrue("provides:" not in meta.lower())
[all …]
Dtest_install_scripts.py27 self.assertTrue(not cmd.force)
28 self.assertTrue(not cmd.skip_build)
29 self.assertTrue(cmd.build_dir is None)
30 self.assertTrue(cmd.install_dir is None)
34 self.assertTrue(cmd.force)
35 self.assertTrue(cmd.skip_build)
75 self.assertTrue(name in installed)

12345678910