Home
last modified time | relevance | path

Searched refs:self (Results 1 – 25 of 7499) sorted by relevance

12345678910>>...300

/external/python/pyfakefs/pyfakefs/tests/
Dfake_pathlib_test.py50 def __init__(self, methodName='runTest'): argument
51 super(RealPathlibTestCase, self).__init__(methodName)
52 self.pathlib = pathlib or pathlib2
53 self.path = None
55 def setUp(self): argument
56 super(RealPathlibTestCase, self).setUp()
57 if not self.use_real_fs():
58 self.pathlib = fake_pathlib.FakePathlibModule(self.filesystem)
59 self.path = self.pathlib.Path
63 def test_initialization_type(self): argument
[all …]
Dfake_filesystem_test.py33 def setUp(self): argument
34 self.orig_time = time.time
36 self.filesystem = fake_filesystem.FakeFilesystem(path_separator='/')
37 self.os = fake_filesystem.FakeOsModule(self.filesystem)
38 self.fake_file = fake_filesystem.FakeFile(
39 'foobar', contents='dummy_file', filesystem=self.filesystem)
40 self.fake_dir = fake_filesystem.FakeDirectory(
41 'somedir', filesystem=self.filesystem)
43 def tearDown(self): argument
44 time.time = self.orig_time
[all …]
Dfake_os_test.py38 def createTestFile(self, path): argument
39 self.create_file(path)
40 self.assertTrue(self.os.path.exists(path))
41 st = self.os.stat(path)
42 self.assertEqual(0o666, stat.S_IMODE(st.st_mode))
43 self.assertTrue(st.st_mode & stat.S_IFREG)
44 self.assertFalse(st.st_mode & stat.S_IFDIR)
46 def createTestDirectory(self, path): argument
47 self.create_dir(path)
48 self.assertTrue(self.os.path.exists(path))
[all …]
/external/llvm-project/lldb/test/API/functionalities/completion/
DTestCompletion.py31 def test_at(self): argument
33 self.complete_from_to('at', 'attach ')
35 def test_de(self): argument
37 self.complete_from_to('de', 'detach ')
39 def test_frame_variable(self): argument
40 self.build()
41 self.main_source = "main.cpp"
42 self.main_source_spec = lldb.SBFileSpec(self.main_source)
44 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
45 '// Break here', self.main_source_spec)
[all …]
/external/google-styleguide/cpplint/
Dcpplint_unittest.py60 def __init__(self, assert_fn): argument
62 self._assert_fn = assert_fn
63 self._errors = []
66 def __call__(self, unused_filename, linenum, argument
68 self._assert_fn(category in self._ERROR_CATEGORIES,
71 self._SEEN_ERROR_CATEGORIES[category] = 1
73 self._errors.append('%s [%s] [%d]' % (message, category, confidence))
75 def Results(self): argument
76 if len(self._errors) < 2:
77 return ''.join(self._errors) # Most tests expect to have a string.
[all …]
/external/python/cpython3/Lib/test/
Dstring_tests.py10 def __init__(self, seq='wxyz'): self.seq = seq argument
11 def __len__(self): return len(self.seq) argument
12 def __getitem__(self, i): return self.seq[i] argument
15 def __init__(self): self.seq = [7, 'hello', 123] argument
16 def __str__(self): return '{0} {1} {2}'.format(*self.seq) argument
19 def __init__(self): self.seq = ['a', 'b', 'c'] argument
20 def __len__(self): return 8 argument
39 def fixtype(self, obj): argument
41 return self.__class__.type2test(obj)
43 return [self.fixtype(x) for x in obj]
[all …]
Dtest_weakset.py14 def __init__(self): argument
15 self.cycle = self
20 def setUp(self): argument
22 self.items = [ustr(c) for c in ('a', 'b', 'c')]
23 self.items2 = [ustr(c) for c in ('x', 'y', 'z')]
24 self.ab_items = [ustr(c) for c in 'ab']
25 self.abcde_items = [ustr(c) for c in 'abcde']
26 self.def_items = [ustr(c) for c in 'def']
27 self.ab_weakset = WeakSet(self.ab_items)
28 self.abcde_weakset = WeakSet(self.abcde_items)
[all …]
Dtest_index.py7 def __index__(self): argument
8 return self.ind
11 def __index__(self): argument
12 return int(self)
15 def setUp(self): argument
16 self.o = newstyle()
17 self.n = newstyle()
19 def test_basic(self): argument
20 self.o.ind = -2
21 self.n.ind = 2
[all …]
/external/python/cpython2/Lib/compiler/
Dast.py25 def getChildren(self): argument
27 def __iter__(self): argument
28 for n in self.getChildren():
30 def asList(self): # for backwards compatibility argument
31 return self.getChildren()
32 def getChildNodes(self): argument
41 def __init__(self, node): argument
42 self.node = node
44 def getChildren(self): argument
45 return self.node,
[all …]
/external/python/cpython2/Lib/lib2to3/tests/
Dtest_util.py25 def assertStr(self, node, string): argument
28 self.assertEqual(str(node), string)
32 def is_tuple(self, string): argument
35 def test_valid(self): argument
36 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("()"))
42 def test_invalid(self): argument
[all …]
/external/python/cpython3/Lib/lib2to3/tests/
Dtest_util.py22 def assertStr(self, node, string): argument
25 self.assertEqual(str(node), string)
29 def is_tuple(self, string): argument
32 def test_valid(self): argument
33 self.assertTrue(self.is_tuple("(a, b)"))
34 self.assertTrue(self.is_tuple("(a, (b, c))"))
35 self.assertTrue(self.is_tuple("((a, (b, c)),)"))
36 self.assertTrue(self.is_tuple("(a,)"))
37 self.assertTrue(self.is_tuple("()"))
39 def test_invalid(self): argument
[all …]
/external/python/cpython3/Lib/tkinter/test/test_ttk/
Dtest_widgets.py19 def test_class(self): argument
20 widget = self.create()
21 self.assertEqual(widget['class'], '')
25 self.checkInvalidParam(widget, 'class', 'Foo', errmsg=errmsg)
26 widget2 = self.create(class_='Foo')
27 self.assertEqual(widget2['class'], 'Foo')
29 def test_padding(self): argument
30 widget = self.create()
31 self.checkParam(widget, 'padding', 0, expected=('0',))
32 self.checkParam(widget, 'padding', 5, expected=('5',))
[all …]
/external/python/cpython2/Lib/test/
Dtest_sets.py13 def test_repr(self): argument
14 if self.repr is not None:
15 self.assertEqual(repr(self.set), self.repr)
17 def test_length(self): argument
18 self.assertEqual(len(self.set), self.length)
20 def test_self_equality(self): argument
21 self.assertEqual(self.set, self.set)
23 def test_equivalent_equality(self): argument
24 self.assertEqual(self.set, self.dup)
26 def test_copy(self): argument
[all …]
Dstring_tests.py10 def __init__(self, seq='wxyz'): self.seq = seq argument
11 def __len__(self): return len(self.seq) argument
12 def __getitem__(self, i): return self.seq[i] argument
15 def __init__(self): self.seq = [7, 'hello', 123L] argument
18 def __init__(self): self.seq = ['a', 'b', 'c'] argument
19 def __len__(self): return 8 argument
33 def fixtype(self, obj): argument
35 return self.__class__.type2test(obj)
37 return [self.fixtype(x) for x in obj]
39 return tuple([self.fixtype(x) for x in obj])
[all …]
Dtest_index.py9 def __index__(self): argument
10 return self.ind
13 def __index__(self): argument
14 return self.ind
17 def __index__(self): argument
18 return self
21 def __index__(self): argument
22 return self
25 def setUp(self): argument
26 self.o = oldstyle()
[all …]
Dtest_weakset.py20 def __init__(self, value): argument
21 self.value = value
22 def __eq__(self, other): argument
23 if type(other) != type(self):
25 return other.value == self.value
27 def __ne__(self, other): argument
28 return not self.__eq__(other)
30 def __hash__(self): argument
31 return hash((SomeClass, self.value))
34 def __init__(self): argument
[all …]
Dtest_set.py21 def __hash__(self): argument
23 def __cmp__(self, other): argument
28 def __repr__(self): argument
29 return repr(self.value)
33 def __init__(self, *args): argument
34 self.hash_count = 0
35 def __hash__(self): argument
36 self.hash_count += 1
37 return int.__hash__(self)
42 def setUp(self): argument
[all …]
/external/python/cpython2/Lib/lib-tk/test/test_ttk/
Dtest_widgets.py21 def test_class(self): argument
22 widget = self.create()
23 self.assertEqual(widget['class'], '')
27 self.checkInvalidParam(widget, 'class', 'Foo', errmsg=errmsg)
28 widget2 = self.create(class_='Foo')
29 self.assertEqual(widget2['class'], 'Foo')
31 def test_padding(self): argument
32 widget = self.create()
33 self.checkParam(widget, 'padding', 0, expected=('0',))
34 self.checkParam(widget, 'padding', 5, expected=('5',))
[all …]
/external/python/cpython2/Lib/unittest/test/
Dtest_case.py21 def runTest(self): pass argument
22 def test1(self): pass argument
25 def test2(self): pass argument
30 def __init__(self, events): argument
31 super(Test.LoggingTestCase, self).__init__('test')
32 self.events = events
34 def setUp(self): argument
35 self.events.append('setUp')
37 def test(self): argument
38 self.events.append('test')
[all …]
/external/python/cpython3/Lib/test/test_importlib/
Dtest_spec.py18 def __init__(self, path=None, is_package=None): argument
19 self.path = path
20 self.package = is_package
22 def __repr__(self): argument
25 def __getattr__(self, name): argument
26 if name == 'get_filename' and self.path is not None:
27 return self._get_filename
29 return self._is_package
32 def _get_filename(self, name): argument
33 return self.path
[all …]
/external/python/cpython2/Lib/lib-tk/
DTix.py86 def tix_addbitmapdir(self, directory): argument
96 return self.tk.call('tix', 'addbitmapdir', directory)
98 def tix_cget(self, option): argument
103 return self.tk.call('tix', 'cget', option)
105 def tix_configure(self, cnf=None, **kw): argument
122 return self._getconfigure('tix', 'configure')
124 return self._getconfigure1('tix', 'configure', '-'+cnf)
125 return self.tk.call(('tix', 'configure') + self._options(cnf))
127 def tix_filedialog(self, dlgclass=None): argument
137 return self.tk.call('tix', 'filedialog', dlgclass)
[all …]
/external/python/cpython3/Lib/tkinter/
Dtix.py82 def tix_addbitmapdir(self, directory): argument
92 return self.tk.call('tix', 'addbitmapdir', directory)
94 def tix_cget(self, option): argument
99 return self.tk.call('tix', 'cget', option)
101 def tix_configure(self, cnf=None, **kw): argument
118 return self._getconfigure('tix', 'configure')
120 return self._getconfigure1('tix', 'configure', '-'+cnf)
121 return self.tk.call(('tix', 'configure') + self._options(cnf))
123 def tix_filedialog(self, dlgclass=None): argument
133 return self.tk.call('tix', 'filedialog', dlgclass)
[all …]
/external/llvm-project/lldb/test/API/tools/lldb-server/
DTestLldbGdbServer.py29 def test_exe_starts_debugserver(self): argument
30 self.init_debugserver_test()
31 server = self.connect_to_debug_monitor()
34 def test_exe_starts_llgs(self): argument
35 self.init_llgs_test()
36 server = self.connect_to_debug_monitor()
38 def thread_suffix_supported(self): argument
39 server = self.connect_to_debug_monitor()
40 self.assertIsNotNone(server)
42 self.add_no_ack_remote_stream()
[all …]
/external/python/cpython3/Tools/scripts/
Dtexi2html.py103 def __init__(self, dir, name, topname, title, next, prev, up): argument
104 self.dirname = dir
105 self.name = name
107 self.topname = topname
109 self.topname = name
110 self.title = title
111 self.next = next
112 self.prev = prev
113 self.up = up
114 self.lines = []
[all …]
/external/python/cpython2/Tools/scripts/
Dtexi2html.py103 def __init__(self, dir, name, topname, title, next, prev, up): argument
104 self.dirname = dir
105 self.name = name
107 self.topname = topname
109 self.topname = name
110 self.title = title
111 self.next = next
112 self.prev = prev
113 self.up = up
114 self.lines = []
[all …]

12345678910>>...300