Commit Graph

16 Commits

Author SHA1 Message Date
Philipp Wolfer
b11b07160d Fixed up left-over Python 2 unicode string declarations 2019-09-26 10:58:54 +02:00
Laurent Monin
be7b4d70bb assertEquals() was deprecated in favor of assertEqual() 2019-09-13 19:31:20 +02:00
Laurent Monin
3089dafe4c Merge pull request #1268 from zas/bytes2human_coverage
Increase test coverage of bytes2human
2019-09-08 10:57:46 +02:00
Laurent Monin
270a0cfe38 Increase test coverage of bytes2human 2019-09-08 10:28:40 +02:00
Philipp Wolfer
1f19ee4b94 Increased test coverage of format tests 2019-09-07 17:46:23 +02:00
Philipp Wolfer
dd4da2aa47 Updated isort config to put test imports in separate section 2019-04-04 08:32:22 +02:00
Wieland Hoffmann
e624aa121c Make PicardTestCase the parent class of all tests
This brings the faketagger and, more importantly, settings reset to all of them.
2018-10-23 17:32:50 +02:00
Philipp Wolfer
ab576a5bb2 Don't use deprecated U file open mode 2018-10-23 11:15:30 +02:00
Sophist
bf4c08e004 Remove unneeded imports in test files 2017-05-17 11:02:24 +01:00
Sambhav Kothari
69251f2907 Fix decode error 2017-04-07 16:06:15 +05:30
Sophist
b80091b56e Use Universal Newline Support instead. 2014-03-24 20:11:14 +00:00
Sophist
78d2ebf9a3 Strip CR as well as LF to avoid errors on Windows 2014-03-24 07:42:40 +00:00
Laurent Monin
7c6d3e9c3b decimal(): fix missing parameter prec and update tests 2013-12-28 00:17:42 +01:00
Laurent Monin
7dd311697f tests: PEP8 fixes 2013-07-03 03:37:24 +02:00
Laurent Monin
fdbed3f6c1 Remove fr_FR locale test, too much a requirement. 2013-06-18 12:24:09 +02:00
Laurent Monin
6de59d8ee9 Add functions to convert bytes to human readable form.
Binary and decimal modes are supported (MB and MiB ie.)
It supports i18n using gettext and locale.
Precision can be modified if needed, by default it is using 1 digit (if needed).

Extensive tests were written, the toughest was to make them work for
both default C locale and fr_FR.UTF-8 locale (ofc it is possible to test for more
locales...). If one locale isn't available on testing system, test is skipped.
fr locale was chosen because decimal point is replaced by a comma and byte units
becomes "octet" units (1.5 MB in english -> 1,5 Mo in french).
2013-06-09 14:23:23 +02:00