You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
skip tests that raise PermissionError in test_os (non-root user on Android) #73366
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-11-12.16:58:02.998>created_at=<Date2017-01-06.15:14:52.715>labels= ['3.7', 'type-bug', 'tests']
title='skip tests that raise PermissionError in test_os (non-root user on Android)'updated_at=<Date2017-11-12.16:58:02.997>user='https://github.com/xdegaye'
Traceback (most recent call last):
File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_os.py", line 1717, in test_unicode_nameself._test_link(self.file1, self.file2)
File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_os.py", line 1698, in _test_link
os.link(file1, file2)
PermissionError: [Errno 13] Permission denied: '@test_2295_tmpñ' -> '@test_2295_tmpñ2'
======================================================================
ERROR: test_stty_match (test.test_os.TermsizeTests)
Check if stty returns the same results
----------------------------------------------------------------------
Traceback (most recent call last):
File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_os.py", line 2795, in test_stty_match
size = subprocess.check_output(['stty', 'size']).decode().split()
File "/sdcard/org.bitbucket.pyona/lib/python3.7/subprocess.py", line 336, in check_output**kwargs).stdout
File "/sdcard/org.bitbucket.pyona/lib/python3.7/subprocess.py", line 403, in runwith Popen(*popenargs, **kwargs) as process:
File "/sdcard/org.bitbucket.pyona/lib/python3.7/subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "/sdcard/org.bitbucket.pyona/lib/python3.7/subprocess.py", line 1323, in _execute_childraise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied
Are you planning to use test.support.os_link() to fix other tests in near future? If test_os is the only user of the helper, I'd say let's keep it in Lib/test/test_os.py for now. test.support is already big enough and it would be better not to put every snippet in it :)
If there are other tests that can benefit from using it, the patch looks good to me.
xdegaye commented on Jan 8, 2017
xdegayemannequin
MannequinAuthor
More actions
If test_os is the only user of the helper, I'd say let's keep it in Lib/test/test_os.py for now.
I agree with that concern.
support.os_link() is also used by a patch in bpo-29181, and I am planning to modify the changes made by bpo-28759 to also use it so that tests calling os.link() are skipped based on the fact that they raise PermissionError instead of based on the fact that they are being run by an Android non-root user as is currently the case.
xdegaye commented on Jan 9, 2017
xdegayemannequin
MannequinAuthor
More actions
New patch following Serhiy's suggestion in msg285008.
Activity
xdegaye commentedon Jan 6, 2017
====================================================================== [1633/2616]
ERROR: test_link (test.test_os.LinkTests)
----------------------------------------------------------------------
======================================================================
ERROR: test_link_bytes (test.test_os.LinkTests)
----------------------------------------------------------------------
======================================================================
ERROR: test_unicode_name (test.test_os.LinkTests)
----------------------------------------------------------------------
======================================================================
ERROR: test_stty_match (test.test_os.TermsizeTests)
Check if stty returns the same results
----------------------------------------------------------------------
======================================================================
ERROR: test_attributes (test.test_os.TestScandir)
----------------------------------------------------------------------
Ran 238 tests in 4.675s
FAILED (errors=5, skipped=40)
test test_os failed
xdegaye commentedon Jan 7, 2017
Patch attached.
berkerpeksag commentedon Jan 8, 2017
Are you planning to use test.support.os_link() to fix other tests in near future? If test_os is the only user of the helper, I'd say let's keep it in Lib/test/test_os.py for now. test.support is already big enough and it would be better not to put every snippet in it :)
If there are other tests that can benefit from using it, the patch looks good to me.
xdegaye commentedon Jan 8, 2017
I agree with that concern.
support.os_link() is also used by a patch in bpo-29181, and I am planning to modify the changes made by bpo-28759 to also use it so that tests calling os.link() are skipped based on the fact that they raise PermissionError instead of based on the fact that they are being run by an Android non-root user as is currently the case.
xdegaye commentedon Jan 9, 2017
New patch following Serhiy's suggestion in msg285008.
xdegaye commentedon Nov 12, 2017
New changeset 6a55d09 by xdegaye in branch 'master':
bpo-29180: Skip test_os tests on PermissionError raised by Android (GH-4374)
6a55d09