Home
last modified time | relevance | path

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

12345678910>>...167

/external/chromium-trace/catapult/telemetry/third_party/pyfakefs/pyfakefs/
Dfake_filesystem_test.py45 def assertModeEqual(self, expected, actual): argument
46 return self.assertEqual(stat.S_IMODE(expected), stat.S_IMODE(actual))
50 def setUp(self): argument
51 self.orig_time = time.time
53 self.fake_file = fake_filesystem.FakeFile('foobar', contents='dummy_file')
54 self.fake_dir = fake_filesystem.FakeDirectory('somedir')
56 def tearDown(self): argument
57 time.time = self.orig_time
59 def testNewFileAndDirectory(self): argument
60 self.assertTrue(stat.S_IFREG & self.fake_file.st_mode)
[all …]
/external/autotest/site_utils/suite_scheduler/
Dtask_unittest.py45 def setUp(self): argument
46 super(TaskTestBase, self).setUp()
47 self.sched = self.mox.CreateMock(deduping_scheduler.DedupingScheduler)
59 def setUp(self): argument
60 super(TaskCreateTest, self).setUp()
61 self.config = forgiving_config_parser.ForgivingConfigParser()
62 self.config.add_section(self._TASK_NAME)
63 self.config.set(self._TASK_NAME, 'suite', self._SUITE)
64 self.config.set(self._TASK_NAME, 'branch_specs', self._BRANCH_SPEC)
65 self.config.set(self._TASK_NAME, 'run_on', self._EVENT_KEY)
[all …]
/external/autotest/client/site_tests/network_ShillInitScripts/
Dnetwork_ShillInitScripts.py37 def start_shill(self): argument
42 def stop_shill(self): argument
47 if not self.find_pid('shill'):
54 def login(self, user=None): argument
66 (user or self.fake_user))
69 (user or self.fake_user))
73 def login_guest(self): argument
79 self.login('""')
82 def logout(self): argument
91 def start_test(self): argument
[all …]
/external/selinux/python/sepolicy/sepolicy/
Dgui.py113 def __init__(self, app=None, test=False): argument
114 self.finish_init = False
115 self.advanced_init = True
116 self.opage = START_PAGE
117 self.dbus = SELinuxDBus()
119 customized = self.dbus.customized()
122 self.quit()
124 self.init_cur()
125 self.application = app
126 self.filter_txt = ""
[all …]
/external/chromium-trace/catapult/dependency_manager/dependency_manager/
Dbase_config_unittest.py20 def setUp(self): argument
21 self.addTypeEqualityFunc(uploader.CloudStorageUploader,
23 self.setUpPyfakefs()
24 self.dependencies = {
43 self.expected_file_lines = [
59 self.file_path = os.path.abspath(os.path.join(
62 self.new_dep_path = 'path/to/new/dep'
63 self.fs.CreateFile(self.new_dep_path)
64 self.new_dep_hash = 'A23B56B7F23E798601F'
65 self.new_dependencies = {
[all …]
/external/libmojo/third_party/catapult/devil/devil/android/
Ddevice_utils_test.py34 def __init__(self, value): argument
35 self._value = value
37 def __eq__(self, other): argument
38 return self._value in other
40 def __repr__(self): argument
41 return '<AnyStringWith: %s>' % self._value
46 def __init__(self, path, package_name, perms=None): argument
47 self.path = path
48 self.package_name = package_name
49 self.perms = perms
[all …]
Dbattery_utils_test.py73 def ShellError(self, output=None, status=1): argument
76 cmd, output, status, str(self.device))
81 def setUp(self): argument
82 self.adb = device_utils_test._AdbWrapperMock('0123456789abcdef')
83 self.device = device_utils.DeviceUtils(
84 self.adb, default_timeout=10, default_retries=0)
85 self.watchMethodCalls(self.call.adb, ignore=['GetDeviceSerial'])
86 self.battery = battery_utils.BatteryUtils(
87 self.device, default_timeout=10, default_retries=0)
92 def testInitWithDeviceUtil(self): argument
[all …]
/external/chromium-trace/catapult/telemetry/telemetry/internal/platform/
Dtracing_controller_backend_unittest.py18 def __init__(self): argument
19 self.build_version_sdk = 99
23 def __init__(self): argument
24 super(PlatformBackend, self).__init__()
25 self._mock_files = {}
27 def GetOSName(self): argument
36 def device(self): argument
42 self, platform, start=True, clock_sync=True, split_collection=True): argument
43 super(FakeTracingAgentBase, self).__init__(platform)
44 self._start = start
[all …]
/external/antlr/antlr-3.4/runtime/Python/antlr3/
Dtree.py67 def __init__(self, elementDescription): argument
68 RuntimeError.__init__(self, elementDescription)
70 self.elementDescription = elementDescription
73 def getMessage(self): argument
74 return self.elementDescription
80 def __init__(self, elementDescription=None): argument
81 RewriteCardinalityException.__init__(self, elementDescription)
114 def getChild(self, i): argument
118 def getChildCount(self): argument
122 def getParent(self): argument
[all …]
Ddebug.py36 def __init__(self, stream, state=None, dbg=None, *args, **kwargs): argument
41 super(DebugParser, self).__init__(stream, state, *args, **kwargs)
44 self._dbg = None
46 self.setDebugListener(dbg)
49 def setDebugListener(self, dbg): argument
54 if hasattr(self.input, 'dbg'):
55 self.input.dbg = dbg
57 self._dbg = dbg
59 def getDebugListener(self): argument
60 return self._dbg
[all …]
/external/skia/infra/bots/recipe_modules/vars/
Dapi.py18 def make_path(self, *path): argument
21 self.m.path.c.base_paths[key] = tuple(path)
22 return self.m.path[key]
24 def setup(self): argument
27 self.builder_name = self.m.properties['buildername']
28 self.master_name = self.m.properties['mastername']
29 self.slave_name = self.m.properties['slavename']
30 self.build_number = self.m.properties['buildnumber']
32 self.slave_dir = self.m.path['start_dir']
33 self.checkout_root = self.slave_dir
[all …]
/external/toolchain-utils/crosperf/
Dbenchmark_run.py33 def __init__(self, name, benchmark, label, iteration, cache_conditions, argument
35 threading.Thread.__init__(self)
36 self.name = name
37 self._logger = logger_to_use
38 self.log_level = log_level
39 self.benchmark = benchmark
40 self.iteration = iteration
41 self.label = label
42 self.result = None
43 self.terminated = False
[all …]
/external/selinux/python/sepolgen/src/sepolgen/
Drefpolicy.py53 def __init__(self, parent=None): argument
54 self.parent = None
55 self.comment = None
74 def __init__(self, parent=None): argument
75 PolicyBase.__init__(self, parent)
76 self.children = []
78 def __iter__(self): argument
79 return iter(self.children)
86 def nodes(self): argument
87 return filter(lambda x: isinstance(x, Node), walktree(self))
[all …]
/external/chromium-trace/catapult/devil/devil/android/
Ddevice_utils_test.py35 def __init__(self, value): argument
36 self._value = value
38 def __eq__(self, other): argument
39 return self._value in other
41 def __repr__(self): argument
42 return '<AnyStringWith: %s>' % self._value
47 def __init__(self, path, package_name, perms=None): argument
48 self.path = path
49 self.package_name = package_name
50 self.perms = perms
[all …]
Dbattery_utils_test.py73 def ShellError(self, output=None, status=1): argument
76 cmd, output, status, str(self.device))
81 def setUp(self): argument
82 self.adb = device_utils_test._AdbWrapperMock('0123456789abcdef')
83 self.device = device_utils.DeviceUtils(
84 self.adb, default_timeout=10, default_retries=0)
85 self.watchMethodCalls(self.call.adb, ignore=['GetDeviceSerial'])
86 self.battery = battery_utils.BatteryUtils(
87 self.device, default_timeout=10, default_retries=0)
92 def testInitWithDeviceUtil(self): argument
[all …]
/external/chromium-trace/catapult/common/battor/battor/
Dbattor_wrapper_unittest.py21 def __init__(self, _): argument
22 self._fetch_return = 'path'
23 self._version_return = 'cbaa843'
25 def FetchPath(self, _, *unused): argument
27 return self._fetch_return
29 def FetchPathWithVersion(self, _, *unused): argument
31 return self._fetch_return, self._version_return
34 def __init__(self, *unused): argument
37 def poll(self): argument
40 def kill(self): argument
[all …]
/external/chromium-trace/catapult/telemetry/telemetry/testing/fakes/
D__init__.py26 def __init__(self): argument
27 self._network_controller = None
28 self._tracing_controller = None
31 def is_host_platform(self): argument
35 def network_controller(self): argument
36 if self._network_controller is None:
37 self._network_controller = _FakeNetworkController()
38 return self._network_controller
41 def tracing_controller(self): argument
42 if self._tracing_controller is None:
[all …]
/external/autotest/client/common_lib/
Dbase_job_unittest.py23 def __init__(self, path, is_writable=False): argument
28 self.path = tempfile.mktemp()
30 self.path = path
38 def __init__(self): argument
39 self._state = {}
40 self._backing_file_lock = None
42 def read_from_file(self, file_path): argument
45 def write_to_file(self, file_path): argument
48 def set_backing_file(self, file_path): argument
51 def _read_from_backing_file(self): argument
[all …]
/external/chromium-trace/catapult/telemetry/third_party/mox3/mox3/tests/
Dtest_mox.py37 def testAtLeastOneMethod(self): argument
38 self.assertRaises(ValueError, mox.ExpectedMethodCallsError, [])
40 def testOneError(self): argument
44 self.assertEqual(
49 def testManyErrors(self): argument
59 self.assertEqual(
71 def testValidOr(self): argument
73 self.assertTrue(mox.Or(mox.IsA(dict), mox.IsA(str)) == {})
74 self.assertTrue(mox.Or(mox.IsA(dict), mox.IsA(str)) == 'test')
75 self.assertTrue(mox.Or(mox.IsA(str), mox.IsA(str)) == 'test')
[all …]
/external/antlr/antlr-3.4/runtime/Python/tests/
Dt042ast.py16 def parserClass(self, base): argument
18 def recover(self, input, re): argument
25 def parse(self, text, method, rArgs=[], **kwargs): argument
26 self.compileGrammar() #options='-trace')
29 self.lexer = self.getLexer(cStream)
30 tStream = antlr3.CommonTokenStream(self.lexer)
31 self.parser = self.getParser(tStream)
34 setattr(self.parser, attr, val)
36 return getattr(self.parser, method)(*rArgs)
39 def testR1(self): argument
[all …]
/external/autotest/client/site_tests/firmware_TouchMTB/
Dtest_flow.py37 def __init__(self, device_geometry, device, keyboard, win, parser, output, argument
39 self.device_geometry = device_geometry
40 self.device = device
41 self.device_node = self.device.device_node
42 self.keyboard = keyboard
43 self.firmware_version = firmware_version
44 self.output = output
45 self.board = board
46 self.test_version = test_version
47 self.output.print_report('%s' % test_version)
[all …]
/external/libcxx/utils/libcxx/test/
Dconfig.py55 def __init__(self, lit_config, config): argument
56 self.lit_config = lit_config
57 self.config = config
58 self.is_windows = platform.system() == 'Windows'
59 self.cxx = None
60 self.cxx_is_clang_cl = None
61 self.cxx_stdlib_under_test = None
62 self.project_obj_root = None
63 self.libcxx_src_root = None
64 self.libcxx_obj_root = None
[all …]
/external/autotest/scheduler/
Dmonitor_db_functional_test.py21 def __init__(self): argument
25 for method_name in self._NULL_METHODS:
26 setattr(self, method_name, null_method)
51 def __init__(self): argument
52 super(MockConnectionManager, self).__init__()
54 def get_connection(self): argument
73 def __init__(self, working_directory, pidfile_name, num_processes=None): argument
74 self._working_directory = working_directory
75 self._pidfile_name = pidfile_name
76 self._num_processes = num_processes
[all …]
/external/autotest/server/cros/
Dhost_lock_manager_unittest.py37 def __init__(self, locked=False): argument
42 self.locked = locked
43 self.locked_by = 'fake_user'
44 self.lock_time = 'fake time'
55 def _host_modifier(self, hosts, operation, lock_reason=''): argument
65 if operation == self.LOCK:
67 self.locked_hosts = self.locked_hosts.union(hosts)
68 elif operation == self.UNLOCK:
69 self.locked_hosts = self.locked_hosts.difference(hosts)
72 def setUp(self): argument
[all …]
/external/autotest/client/cros/cellular/wardmodem/
Dat_transceiver_unittest.py26 def test_function(self, _): argument
39 def get_well_known_name(self): argument
44 def setUp(self): argument
45 self._mox = mox.Mox()
50 self._modem_conf = modem_configuration.ModemConfiguration()
51 self._at_transceiver = at_transceiver.ATTransceiver(slave,
52 self._modem_conf,
56 self._at_transceiver._modem_response_timeout_milliseconds = 0
57 self._mock_modem_channel = self._mox.CreateMock(at_channel.ATChannel)
58 self._at_transceiver._modem_channel = self._mock_modem_channel
[all …]

12345678910>>...167