Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MPSD HPC Tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository 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
MPSD Computational Science
MPSD HPC Tools
Commits
aa729110
Commit
aa729110
authored
1 week ago
by
Henning Glawe
Browse files
Options
Downloads
Patches
Plain Diff
reformat with black
parent
c39e1458
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mpsd_hpc_tools/quota.py
+1
-1
1 addition, 1 deletion
src/mpsd_hpc_tools/quota.py
tests/test_quota.py
+1
-1
1 addition, 1 deletion
tests/test_quota.py
with
2 additions
and
2 deletions
src/mpsd_hpc_tools/quota.py
+
1
−
1
View file @
aa729110
...
...
@@ -87,7 +87,7 @@ def df_mountpoint(path: pathlib.Path) -> Tuple[int, int, int]:
return
None
,
None
,
None
for
line
in
output
.
splitlines
():
df_fields
=
line
.
split
()
if
(
df_fields
[
0
]
==
"
Filesystem
"
)
:
if
df_fields
[
0
]
==
"
Filesystem
"
:
continue
(
size
,
used
,
avail
)
=
[
int
(
df_field
)
for
df_field
in
df_fields
[
1
:
4
]]
return
size
,
used
,
avail
...
...
This diff is collapsed.
Click to expand it.
tests/test_quota.py
+
1
−
1
View file @
aa729110
...
...
@@ -54,7 +54,7 @@ def test_df_ceph(mocker):
def
test_df_mountpoint
(
mocker
):
mock
=
mocker
.
patch
(
"
subprocess.check_output
"
,
return_value
=
"
Filesystem 1B-blocks Used Available Use% Mounted on
\n
somedev 1000 500 500 1% /home/glawe
\n
"
.
encode
()
return_value
=
"
Filesystem 1B-blocks Used Available Use% Mounted on
\n
somedev 1000 500 500 1% /home/glawe
\n
"
.
encode
()
,
)
size
,
used
,
avail
=
quota
.
df_mountpoint
(
"
/home/MOCK
"
)
assert
isinstance
(
size
,
int
)
...
...
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