mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-30 07:50:43 +00:00
new human_readable filter to transform bits and bytes into cake (not really)
This commit is contained in:
parent
08fcd82331
commit
688088547b
2 changed files with 37 additions and 0 deletions
|
|
@ -41,3 +41,11 @@
|
|||
that:
|
||||
- 'diff_result.stdout == ""'
|
||||
|
||||
- name: Verify human_readable
|
||||
assert:
|
||||
that:
|
||||
- '"10.00 KB" == 10240|human_readable'
|
||||
- '"97.66 MB" == 102400000|human_readable'
|
||||
- '"0.10 GB" == 102400000|human_readable(unit="G")'
|
||||
- '"0.10 Gb" == 102400000|human_readable(isbits=True, unit="G")'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue