Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
85c91e89
Commit
85c91e89
authored
Nov 25, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19742: fix a test_pathlib failure when a file owner or group isn't in the system database
parent
7a9114b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
Lib/test/test_pathlib.py
Lib/test/test_pathlib.py
+10
-2
No files found.
Lib/test/test_pathlib.py
View file @
85c91e89
...
...
@@ -1322,14 +1322,22 @@ class _BasePathTest(object):
def
test_owner
(
self
):
p
=
self
.
cls
(
BASE
)
/
'fileA'
uid
=
p
.
stat
().
st_uid
name
=
pwd
.
getpwuid
(
uid
).
pw_name
try
:
name
=
pwd
.
getpwuid
(
uid
).
pw_name
except
KeyError
:
self
.
skipTest
(
"user %d doesn't have an entry in the system database"
%
uid
)
self
.
assertEqual
(
name
,
p
.
owner
())
@
unittest
.
skipUnless
(
grp
,
"the grp module is needed for this test"
)
def
test_group
(
self
):
p
=
self
.
cls
(
BASE
)
/
'fileA'
gid
=
p
.
stat
().
st_gid
name
=
grp
.
getgrgid
(
gid
).
gr_name
try
:
name
=
grp
.
getgrgid
(
gid
).
gr_name
except
KeyError
:
self
.
skipTest
(
"group %d doesn't have an entry in the system database"
%
gid
)
self
.
assertEqual
(
name
,
p
.
group
())
def
test_unlink
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment