[all] small fixed picked up by pytest

- unicode stuff
- make all regexps regex strings
This commit is contained in:
tobi-wan-kenobi 2020-06-02 20:13:39 +02:00
parent 9cadcee844
commit 5e40dfb28a
9 changed files with 12 additions and 10 deletions

View file

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
import re
@ -87,7 +89,7 @@ def byte(val, fmt="{:.2f}"):
return "{}GiB".format(fmt).format(val * 1024.0)
__seconds_pattern = re.compile("(([\d\.?]+)h)?(([\d\.]+)m)?([\d\.]+)?s?")
__seconds_pattern = re.compile(r"(([\d\.?]+)h)?(([\d\.]+)m)?([\d\.]+)?s?")
def seconds(duration):