Philipp Wolfer
7e937e851a
PICARD-1765: Adding / removing preserved tags must normalize the tags
2020-02-24 08:49:22 +00:00
Philipp Wolfer
5d450e563f
PICARD-1746: Change "Generate Fingerprints" shortcut to Ctrl+Shift+Y
2020-02-24 08:32:36 +00:00
Laurent Monin
b5a97c9926
Merge pull request #1493 from zas/cov_cleanup
...
Coverage & cleanup
2020-02-24 00:34:49 +01:00
Laurent Monin
3585d40b0b
PICARD-1762: fix broken PDF identification
...
In identify(), comparaison was done against `str` instead of `bytecode`, due to the lack of `b` prefix
ImageInfoTest: add missing test PDF file identification
2020-02-23 13:07:30 +00:00
Laurent Monin
ed351fbbd6
ImageInfoTest: remove useless ending comma
2020-02-22 21:04:32 +01:00
Laurent Monin
dc77e652be
album_artist_from_path(): simplify regex
...
Use word boundaries and do not capture
2020-02-22 21:04:32 +01:00
Laurent Monin
ef7e154c4f
album_artist_from_path(): remove useless code
...
len(dirs) == 0 cannot happen, because `whatever.split('/')` is always a list with at least 1 element.
So simplify code and remove useless tests
2020-02-22 21:04:32 +01:00
Laurent Monin
77a9d0110a
AlbumArtistFromPathTest: add a bunch of missing tests
2020-02-22 21:04:32 +01:00
Laurent Monin
27f04356d5
TranslateArtistTest: ensure name is returned in latin-only case
...
The previous test wasn't that good as a reversed sortname could actually assert true
2020-02-22 21:04:32 +01:00
Laurent Monin
af5e9d647e
TranslateArtistTest: improve coverage
...
Cases with non-latin and 3 or 4 chunks were missing
2020-02-22 21:04:32 +01:00
Laurent Monin
bd95736da4
TranslateArtistTest: u"" -> "" (Python3)
2020-02-22 21:04:32 +01:00
Laurent Monin
64bfb17733
TranslateArtistTest: remove useless assertNotEqual()
...
Since we assert a equals b, no need to assert a not equal c when b & c are different
Coverage is unchanged.
2020-02-22 21:04:32 +01:00
Laurent Monin
42d0a72b74
Improve coverage of union_sorted_lists() tests
2020-02-22 21:04:32 +01:00
Bob Swift
170b8e0aa7
Add $sortmulti, $reversemulti and associated tests
2020-02-22 19:24:13 +00:00
Philipp Wolfer
4a4f699077
PICARD-1760: Prevent duplicates in top tags editor
2020-02-22 19:13:26 +00:00
Laurent Monin
51f81f1783
Merge pull request #1490 from zas/fix_header
...
Fix license header in source files
2020-02-22 15:50:27 +01:00
Laurent Monin
8dce9b1342
Add support for fix-header: skip, to ignore a file
...
Comment formats supported:
#
/* */
//
2020-02-22 13:52:36 +01:00
Philipp Wolfer
a319513410
fix-header.py: Preserve shebang
...
Preserve shebang at start of file. Also ran fix-header.py on itself.
2020-02-22 12:46:48 +01:00
Laurent Monin
5a0abcf156
Add few more entries to aliases
2020-02-22 12:46:48 +01:00
Laurent Monin
6f61574d5f
fix-header.py: Fixed merging years from log and file
2020-02-22 12:46:48 +01:00
Philipp Wolfer
3e3713ea82
fix-header.py: Added shebang and moved to scripts/tools
2020-02-22 12:46:48 +01:00
Philipp Wolfer
e2b979e734
fix_header.py: Fixed merging of authors from file and log
2020-02-22 12:46:48 +01:00
Laurent Monin
10a019091b
Ignore codacy warnings about subprocess
2020-02-22 12:46:48 +01:00
Laurent Monin
66c19491a3
Add a script to maintain license in source files
...
It uses existing copyrights and authors from git log.
2020-02-22 12:46:48 +01:00
Laurent Monin
a875b19792
Merge pull request #1488 from zas/tests_cleanup
...
Tests cleanup
2020-02-21 22:01:17 +01:00
Laurent Monin
3f25bda3c8
Fix a bunch of flake8 warnings, mostly cosmetic changes
2020-02-21 21:43:40 +01:00
Laurent Monin
cc84c2ee07
Merge pull request #1475 from zas/multivalue_class
...
Introduce MultiValue class to simplify script functions
2020-02-21 21:41:42 +01:00
Philipp Wolfer
a67f4327fc
PICARD-1759: Show internal tag names in TagListEditor
...
Instead of showing the display name directly show the internal tag name as it is expected for input also.
2020-02-21 20:18:40 +00:00
Philipp Wolfer
0dda97b8b8
PICARD-1759: Case-insensitive completer for TagListEditor
...
Make the completer used for TagListEditor case insensitive and always show the complete list of tags. That makes it easier for the user to see what values are expected.
2020-02-21 20:18:40 +00:00
Laurent Monin
6365295ee4
Add tests for MultiValue
...
100% coverage on the class
2020-02-21 21:04:24 +01:00
Laurent Monin
98f0bcebc8
MultiValue: remove assert statement to please Codacy
...
It shouldn't be needed anyways
2020-02-21 20:39:41 +01:00
Laurent Monin
18c02c605d
MultiValue: get rid of _get_multi_values() and simplify code even more
2020-02-21 20:39:41 +01:00
Laurent Monin
ce0f9c159d
MultiValue: simplify code
2020-02-21 20:39:41 +01:00
Laurent Monin
32dd385aec
MultiValue: add __str__() method, returning joined string
...
It uses MultiValue.separator as join string
2020-02-21 20:39:41 +01:00
Laurent Monin
9ca390b8d3
Stick to Data Model names (index -> key)
2020-02-21 20:39:41 +01:00
Laurent Monin
c83a045639
Name multi values consistently
2020-02-21 20:39:40 +01:00
Laurent Monin
800c8abcca
Use MultiValue.separator to simplify code
2020-02-21 20:39:40 +01:00
Laurent Monin
b16f2099a7
func_lenmulti(): no need to call func_len()
2020-02-21 20:39:40 +01:00
Laurent Monin
1cec6e3e06
Replace _get_multi_values() with MultiValue()
2020-02-21 20:39:40 +01:00
Laurent Monin
6992b271c3
Add MultiValue class to handle script multi-values
2020-02-21 20:39:40 +01:00
Laurent Monin
9dfc09b4c4
Bump github actions checkout to v2
...
It seems much less prone to failures
2020-02-21 19:35:38 +00:00
Laurent Monin
0860e1db15
Merge pull request #1486 from zas/scriptfunctions_cov
...
Improve script functions test coverage
2020-02-20 22:50:17 +01:00
Philipp Wolfer
b40a3cb9cd
PICARD-1756: Fix plugin update version comparison
...
Use Version class to implement version comparison. Fixes updater considering 1.10 < 1.9
2020-02-20 21:18:07 +00:00
Laurent Monin
6f9b171d1c
Test script_function decorator
...
Changes were made to ensure ScriptParser registry is resetted on each test
2020-02-20 21:54:06 +01:00
Laurent Monin
ccf6edfbd9
Complete multi functions tests
2020-02-20 21:06:09 +01:00
Laurent Monin
037a487710
$title: test all cases, and drop test for empty text which cannot happen
2020-02-20 21:06:09 +01:00
Laurent Monin
37631e8ad7
$rsearch: test unmatched regex
2020-02-20 21:06:09 +01:00
Laurent Monin
5b1cfc5470
$div: test non-numeric parameter
2020-02-20 21:06:09 +01:00
Laurent Monin
665a3e9885
$div: Test and handle division by zero error
2020-02-20 21:06:09 +01:00
Laurent Monin
55ad8a3924
Test various unknown functions and unexpected script errors
2020-02-20 21:06:09 +01:00