Laurent Monin
7d515367f2
Merge pull request #1946 from phw/refactor_cdrom
...
Refactor picard.util.cdrom
2021-11-11 11:11:03 +01:00
Philipp Wolfer
2ea94a4d21
cdrom: Always test generic implementation
2021-11-11 09:13:09 +01:00
Philipp Wolfer
5e4cac7184
Add generic tests for util.cdrom
2021-11-11 09:12:29 +01:00
Philipp Wolfer
5a292078b7
Refactor cdrom device reading on Linux
...
Simplify code, add tests, get rid of Qt dependency
2021-11-11 09:12:22 +01:00
Philipp Wolfer
1f823fa67b
Refactor util.cdrom to reduce code complexity
2021-11-11 09:10:48 +01:00
Bob Swift
b8efed73a0
Update naming script quick selector after enabling/disabling profiles
2021-11-11 08:17:09 +01:00
Laurent Monin
14ce07756e
Update Copyright headers, with the help of fix-headers.py script
2021-11-10 21:38:54 +01:00
Laurent Monin
82aca65087
Merge pull request #1944 from zas/file_update_rework
...
File.update() rework & testing
2021-11-10 19:08:53 +01:00
Philipp Wolfer
0816eb61bf
Simplify i18n.setup_gettext
2021-11-10 18:45:39 +01:00
Laurent Monin
5b396ea766
Move part of File.update() code to a new generator File._tags_to_update()
...
- test it separately
- override File.supports_tag() for all tests, it ensures consistency
2021-11-10 18:06:01 +01:00
Philipp Wolfer
8d99fb7001
Update NatAlbum.update to match Album.update method signature
2021-11-10 16:39:32 +01:00
Laurent Monin
ca6cee6096
Simplify tests
2021-11-10 16:03:46 +01:00
Philipp Wolfer
23f9ff16ac
remark-lint: allow Github checkboxes
2021-11-10 16:02:31 +01:00
Laurent Monin
f0a5e7aeaf
File.update(): use self.metadata directly, no need of intermediate variable
2021-11-10 15:38:32 +01:00
Philipp Wolfer
2f34f3cd2e
Fixed appx signing
2021-11-10 15:05:56 +01:00
Philipp Wolfer
f22c3ea965
Use SecureString in Windows Powershell packaging script
2021-11-10 14:59:42 +01:00
Laurent Monin
6380791c1a
File.update(): use if/continue with only one condition (3)
2021-11-10 12:57:02 +01:00
Laurent Monin
61a1021c62
File.update(): use if/continue with only one condition (2)
2021-11-10 12:56:01 +01:00
Laurent Monin
ba36e31c9f
File.update(): use if/continue with only one condition
2021-11-10 12:53:23 +01:00
Laurent Monin
da5fabc63f
Also test with initial default state File.PENDING where it makes sense
2021-11-10 12:47:53 +01:00
Laurent Monin
9d5d0fd01e
File.update(): add tests, 100% coverage
...
pytest --verbose --cov=picard --cov-report html test/test_file.py -k "FileUpdateTest"
2021-11-10 11:38:55 +01:00
Laurent Monin
c9aa72e59c
File.update(): reformat code a bit to ease coverage testing
2021-11-10 11:37:17 +01:00
Philipp Wolfer
49931a136e
Renamed mock classes in test_log
...
Avoids warnings by pytest trying to interpret these classes as test fixtures.
2021-11-10 08:08:50 +01:00
Philipp Wolfer
a01f28d0c0
PICARD-2327: Detect hidden files on macOS
2021-11-10 08:02:50 +01:00
Philipp Wolfer
5de0efc025
Merge pull request #1940 from zas/file_move_rename
...
Rework additional files methods
2021-11-10 08:02:28 +01:00
Philipp Wolfer
8988f8692e
PICARD-2328: Fix "arguments did not match any overloaded call" error with Python 3.10
2021-11-10 05:51:49 +01:00
Laurent Monin
54ba988666
Test _get_additional_files_moves()
2021-11-09 23:15:23 +01:00
Laurent Monin
4e9aa419ba
_get_additional_files_moves(): Move exception handling to caller
...
It will be easier to test if exception is correctly raised
2021-11-09 23:13:23 +01:00
Laurent Monin
32032de3c2
Move settings from module level to class level, as it is only used there
2021-11-09 22:32:28 +01:00
Laurent Monin
0651a7c34b
Simplify test_filesystem
...
- try to make it a bit more readable
- move prepare_files() outside test class, so it can easily be re-used
- use name of files directly
- split files dict in two: src & dst
2021-11-09 22:27:13 +01:00
Laurent Monin
93a8d83365
Make _compile_move_additional_files_pattern() a static method and simplify tests
...
- do not pass config but the patterns string
- make it a static method (it doesn't need self anyway)
- simplify tests accordingly
2021-11-09 21:43:40 +01:00
Laurent Monin
2d7e8cde9f
Partially revert previous patches, keeping parameters as they were
...
https://github.com/metabrainz/picard/pull/1940#discussion_r745955335
https://github.com/metabrainz/picard/pull/1940#discussion_r745956334
2021-11-09 21:05:38 +01:00
Philipp Wolfer
10caa13975
Add Windows specific unit test for util.is_hidden
2021-11-09 20:58:17 +01:00
Laurent Monin
f4a27d91aa
_move_additional_files(): invert logic, and remove returns
2021-11-09 18:12:13 +01:00
Laurent Monin
db89562958
_get_additional_files_moves(): make it a generator
...
- there's no need for a set, as entries are unique
2021-11-09 18:04:28 +01:00
Laurent Monin
1486bdb0f0
_apply_additional_files_moves(): call _get_additional_files_moves() directly
...
- pass old_path, new_path, config instead of moves
2021-11-09 17:58:05 +01:00
Laurent Monin
725033c55e
Call _compile_move_additional_files_pattern() directly from _get_additional_files_moves()
...
- pass config parameter to _get_additional_files_moves() instead of patterns
2021-11-09 17:55:49 +01:00
Laurent Monin
cd188dcebf
Rewrite to use a set comprehension
...
- using strip() isn't needed as split(sep=None) will take care of multiple whitespaces
- from 10 lines to 4, and likely a tad faster
2021-11-09 17:45:26 +01:00
Laurent Monin
37982bed94
Also test weird whitespacing, multiple or newlines
2021-11-09 17:42:48 +01:00
Laurent Monin
baba955cf0
Since the pattern matching is case-insensitive, lowercase pattern string
...
- it helps to remove duplicates (like cover.jpg cover.JPG)
- fix test accordingly
2021-11-09 17:27:15 +01:00
Philipp Wolfer
3d8bfe9d4a
Release 2.7.0b2
2021-11-09 13:26:43 +01:00
Laurent Monin
21c5722f5a
Add tests for File._compile_move_additional_files_pattern()
2021-11-09 13:18:27 +01:00
Philipp Wolfer
ca85e64cc8
Updated translations from transifex
2021-11-09 12:22:22 +01:00
Philipp Wolfer
a67ca328fc
Merge pull request #1938 from phw/PICARD-2324-fix-wvc-rename
...
PICARD-2324: Fix renaming of WavPack correction files
2021-11-09 12:03:06 +01:00
Philipp Wolfer
7683ca0688
Reduce code complexity in File._move_additional_files
2021-11-09 11:44:58 +01:00
Philipp Wolfer
a66b2ad779
PICARD-2324: Run .wvc rename code only if rename_files or move_files are set
2021-11-09 11:02:34 +01:00
Philipp Wolfer
d8406b5159
PICARD-2324: Move .wvc files before moving additional files
2021-11-09 11:02:34 +01:00
Philipp Wolfer
7cab070f74
PICARD-2324: Fix renaming of WavPack correction files
2021-11-09 08:51:25 +01:00
Philipp Wolfer
1686b7eb9c
imagelist.add_metadata_images must return False on empty image list
2021-11-07 15:01:18 +01:00
Philipp Wolfer
a337bd0d20
PICARD-2322: Update album images after load and matching files
2021-11-07 15:01:18 +01:00