Files
picard/test
Wieland Hoffmann 47e0b4db0e test_regexfilter: Fix the test
* only repeats the preceding regular expression, but in the old test, there was
nothing preceding it. This showed up when tests were executed via `python
setup.py test`:

> .........................................E: 20:54:38,617 /home/wieland/dev/picard/picard/track.__init__:88: Failed to compile regex /*/: nothing to repeat at position 0
> Traceback (most recent call last):
>   File "/home/wieland/dev/picard/picard/track.py", line 86, in __init__
>     regex_search = re.compile(remain, re.IGNORECASE)
>   File "/usr/lib/python3.7/re.py", line 234, in compile
>     return _compile(pattern, flags)
>   File "/usr/lib/python3.7/re.py", line 286, in _compile
>     p = sre_compile.compile(pattern, flags)
>   File "/usr/lib/python3.7/sre_compile.py", line 764, in compile
>     p = sre_parse.parse(p, flags)
>   File "/usr/lib/python3.7/sre_parse.py", line 930, in parse
>     p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
>   File "/usr/lib/python3.7/sre_parse.py", line 426, in _parse_sub
>     not nested and not items))
>   File "/usr/lib/python3.7/sre_parse.py", line 651, in _parse
>     source.tell() - here + len(this))
> re.error: nothing to repeat at position 0

This was swallowed by py.test's behaviour to swallow stdout & stderr if no tests
fail.

Remove `*` from test_regexfilter and add an additional test with `/.*/` to
ensure this works.

The genre filter UI handled this correctly by showing the re.error in the UI.
2019-10-09 08:23:08 +02:00
..
2019-09-13 20:30:19 +02:00