Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
687ba50c
Commit
687ba50c
authored
8 months ago
by
Thomas Kluyver
Committed by
Karim Ahmed
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Skip permission test when run as root
parent
95595580
No related branches found
No related tags found
1 merge request
!984
Try updating to Python 3.11 & update all deps
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_webservice.py
+5
-0
5 additions, 0 deletions
tests/test_webservice.py
with
5 additions
and
0 deletions
tests/test_webservice.py
+
5
−
0
View file @
687ba50c
import
os
import
datetime
as
dt
import
datetime
as
dt
import
logging
import
logging
import
sys
import
sys
...
@@ -62,6 +64,9 @@ def test_check_files(tmp_path):
...
@@ -62,6 +64,9 @@ def test_check_files(tmp_path):
runs
=
[
1
,
2
]
runs
=
[
1
,
2
]
assert
not
check_files
(
in_folder
,
runs
,
karabo_das
)
assert
not
check_files
(
in_folder
,
runs
,
karabo_das
)
if
os
.
getuid
()
==
0
:
return
# root can bypass access permissions, so the test below doesn't work
noaccess
=
tmp_path
/
"
noaccess
"
noaccess
=
tmp_path
/
"
noaccess
"
noaccess
.
mkdir
(
mode
=
0o000
)
# make a directory we can't read
noaccess
.
mkdir
(
mode
=
0o000
)
# make a directory we can't read
with
pytest
.
raises
(
PermissionError
):
with
pytest
.
raises
(
PermissionError
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment