FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-progressbar/tests/test_data.py at develop · wolph/python-progressbar · GitHub
wolph
/
python-progressbar
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
106
Star
879
Code
Issues
1
Pull requests
0
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-progressbar
/
tests
/
test_data.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (22 loc) · 594 Bytes
Breadcrumbs
python-progressbar
/
tests
/
test_data.py
Copy path
File metadata and controls
25 lines (22 loc) · 594 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import
pytest
import
progressbar
@
pytest
.
mark
.
parametrize
(
'value,expected'
,
[
(
None
,
' 0.0 B'
),
(
1
,
' 1.0 B'
),
(
2
**
10
-
1
,
'1023.0 B'
),
(
2
**
10
+
0
,
' 1.0 KiB'
),
(
2
**
20
,
' 1.0 MiB'
),
(
2
**
30
,
' 1.0 GiB'
),
(
2
**
40
,
' 1.0 TiB'
),
(
2
**
50
,
' 1.0 PiB'
),
(
2
**
60
,
' 1.0 EiB'
),
(
2
**
70
,
' 1.0 ZiB'
),
(
2
**
80
,
' 1.0 YiB'
),
(
2
**
90
,
'1024.0 YiB'
),
],
)
def
test_data_size
(
value
,
expected
)
->
None
:
widget
=
progressbar
.
DataSize
()
assert
widget
(
None
,
dict
(
value
=
value
))
==
expected
Back
|
FazBrowse Home
|
New Git URL