Bug 1147614 - [mozdevice] The property ADBDevice.test_root does not appear in documentation. r=bclary

This commit is contained in:
Julien Pages 2015-03-31 03:17:00 -07:00
Родитель 4ca033afe0
Коммит 258af81ab8
2 изменённых файлов: 23 добавлений и 2 удалений

Просмотреть файл

@ -185,6 +185,7 @@ File management methods
.. automethod:: ADBDevice.push(self, local, remote, timeout=None)
.. automethod:: ADBDevice.rm(self, path, recursive=False, force=False, timeout=None, root=False)
.. automethod:: ADBDevice.rmdir(self, path, timeout=None, root=False)
.. autoattribute:: ADBDevice.test_root
Process management methods
++++++++++++++++++++++++++

Просмотреть файл

@ -683,11 +683,31 @@ class ADBDevice(ADBCommand):
@property
def test_root(self):
"""Set up the test root and cache its value
"""
The test_root property returns the directory on the device where
temporary test files are stored.
The first time test_root it is called it determines and caches a value
for the test root on the device. It determines the appropriate test
root by attempting to create a 'dummy' directory on each of a list of
directories and returning the first successful directory as the
test_root value.
The default list of directories checked by test_root are:
- /storage/sdcard0/tests
- /storage/sdcard1/tests
- /sdcard/tests
- /mnt/sdcard/tests
- /data/local/tests
You may override the default list by providing a test_root argument to
the :class:`ADBDevice` constructor which will then be used when
attempting to create the 'dummy' directory.
:raises: * ADBTimeoutError
* ADBRootError
* ADBError
"""
if self._test_root is not None:
return self._test_root