Commit Graph

700 Commits

Author SHA1 Message Date
Ionuț Ciocîrlan
156aeda8a0 updated tests for filename shortening (which now returns relative paths) 2014-01-07 17:59:50 +02:00
Laurent Monin
08ce08caa2 Merge pull request #187 from zas/picard528
PICARD-528: ignore file paths if hidden or excluded by regex
2014-01-06 16:34:06 -08:00
Laurent Monin
c2d53a4d4d version_from_string(): match end of the string instead full string 2014-01-02 17:32:34 +01:00
Laurent Monin
6e889ca0a0 Use exceptions in place of assertions -> VersionError 2014-01-02 17:28:41 +01:00
Laurent Monin
81ec25afcd Make version_from_string() more tolerant 2014-01-02 11:50:51 +01:00
Laurent Monin
4554898e42 version_to_string(): be smarter and accept list with strings 2013-12-31 15:31:12 +01:00
Laurent Monin
7c6d3e9c3b decimal(): fix missing parameter prec and update tests 2013-12-28 00:17:42 +01:00
Laurent Monin
a0598bdc6f Ignore hidden files and directories based on show_hidden_files option.
http://tickets.musicbrainz.org/browse/PICARD-528
2013-12-27 11:09:23 +01:00
Michael Wiencek
f144dde30d Support the Jaikoz 'artists' tag, with help from @night199uk and @zas 2013-12-07 18:12:51 -06:00
Laurent Monin
e9bd756144 Add more info to release name in other releases list if needed.
Context menu listing other releases is using main information from release,
often it is enough, but sometimes two or more items in the list are exactly
the same, user have to select each one to determine which is matching for him.

This patch is improving a bit the situation by adding packaging, barcode, or even
disambiguation comment if needed.
As an example, it often happens when a CD is released in jewel case and digipak,
with same label, date, country, barcode, etc..

Use more explicit '[no barcode]' instead of '[none]'.

A test case was added for this feature.
2013-12-06 08:43:23 +01:00
Ionuț Ciocîrlan
f1e8257d5a Merge remote-tracking branch 'upstream/master'
Conflicts:
	picard/file.py
2013-10-20 18:34:51 +03:00
Calvin Walton
769748c276 Fix the track test to include track mbid, change internal recording id name 2013-09-22 14:24:24 -04:00
Laurent Monin
ff0bd54153 Add a real life test for track number case extraction 2013-08-06 14:48:49 +02:00
Laurent Monin
2ec0631217 Use a smarter method to extract track number from filename.
When file has no metadata field indicating the track number, Picard
is trying to guess it from filename, but the simple regex wasn't very efficient.

tracknum_from_filename() does a much better job.
A test case was added.
2013-08-05 00:40:11 +02:00
Ionuț Ciocîrlan
aaab0dae48 moved filenaming stuff to its own module 2013-07-06 11:38:12 +03:00
Ionuț Ciocîrlan
b07e7f3e4d Merge remote-tracking branch 'upstream/master'
Conflicts:
	picard/util/__init__.py
	test/test_utils.py
2013-07-06 10:21:00 +03:00
Laurent Monin
7dd311697f tests: PEP8 fixes 2013-07-03 03:37:24 +02:00
Michael Wiencek
b3fcb04f9c Merge pull request #131 from zas/update_config_2
Handle configuration file versions
2013-07-02 15:06:58 -07:00
Laurent Monin
97f00b2d29 Handle configuration file versions.
version_info was renamed PICARD_VERSION
version_string was renamed PICARD_VERSION_STR
short version string is stored in PICARD_VERSION_STR_SHORT (for display)

Hooks can be created to handle upgrades (ie. options renaming), see config.register_upgrade_hook() and config.run_upgrade_hooks()
2013-07-02 01:45:25 +02:00
Laurent Monin
329ed8cedb Deprecated failUnlessAlmostEqual() -> assertAlmostEqual()
http://docs.python.org/2/library/unittest.html#deprecated-aliases
2013-07-01 13:34:53 +02:00
Laurent Monin
60ed243470 Deprecated failUnlessRaises() -> assertRaises()
http://docs.python.org/2/library/unittest.html#deprecated-aliases
2013-07-01 13:33:42 +02:00
Laurent Monin
6062fe404e Deprecated failIfEqual() -> assertNotEqual()
http://docs.python.org/2/library/unittest.html#deprecated-aliases
2013-07-01 13:31:41 +02:00
Laurent Monin
403bafbbaa Deprecated failUnlessEqual() -> assertEqual()
http://docs.python.org/2/library/unittest.html#deprecated-aliases
2013-07-01 13:29:57 +02:00
Laurent Monin
f892444998 Create a function to parse amazon urls and reduce code redundancy.
A test for amazon url parsing was added.
2013-06-30 17:25:15 +02:00
Laurent Monin
4fc84a428b Remove (now) useless data test file. 2013-06-19 19:27:10 +02:00
Laurent Monin
fdbed3f6c1 Remove fr_FR locale test, too much a requirement. 2013-06-18 12:24:09 +02:00
Ionuț Ciocîrlan
e68dc99bf6 Merge remote-tracking branch 'upstream/master' 2013-06-17 21:50:47 +03:00
Ionuț Ciocîrlan
fe8f6c2176 Characters counted in UTF-16 code points where appropriate.
NFD handled under OS X.
Windows bugfix when the relative directory path is short enough.
2013-06-17 21:42:10 +03:00
Lukáš Lalinský
b3f2e99130 Merge remote-tracking branch 'zas/info_dialog2'
Conflicts:
	picard/tagger.py
2013-06-17 08:20:42 +02:00
Ionuț Ciocîrlan
9bb1cc267d Merge remote-tracking branch 'upstream/master'
Conflicts:
	picard/file.py
2013-06-14 22:04:53 +03:00
Ionuț Ciocîrlan
1b695eea63 small fixes and some comments 2013-06-14 21:18:25 +03:00
Ionuț Ciocîrlan
6d8c912006 Merge remote-tracking branch 'upstream/master'
Conflicts:
	picard/file.py
	picard/ui/options/renaming.py
2013-06-11 19:37:10 +03:00
Sophist
2c3cb1bf02 Fix format test file 2013-06-11 16:51:26 +01:00
Ionuț Ciocîrlan
c2874ed671 tests and subsequent fixes 2013-06-11 18:19:15 +03: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
Michael Wiencek
d5509680ab Fix tests 2013-06-09 01:45:18 -05:00
Laurent Monin
b246e4b709 Reduce cover art vs formats test code redundancy. 2013-06-08 00:54:09 +02:00
Laurent Monin
5bc82bfa53 Fix tests for cover art vs formats, they couldn't fail. 2013-06-08 00:45:59 +02:00
Wieland Hoffmann
8415c360af Fix coverart tests 2012-10-20 12:05:35 +02:00
Michael Wiencek
433606f2d6 Use PyQt's new-style signal syntax 2012-09-08 00:08:45 -05:00
Michael Wiencek
4a60fbf2e6 Add a unit test for lyrics language 2012-08-17 02:48:09 -05:00
Michael Wiencek
d31b4344c1 Don't use _ as a name, try 2
I screwed up the last commit.
2012-08-16 05:00:58 -05:00
Michael Wiencek
003e808fbf Don't use _ as a name
Fixes an issue from the previous commit where I used _ as a temp
variable name. It only broke the infodialog, but I'm replacing it
everywhere just to be safe.
2012-08-16 04:39:31 -05:00
Michael Wiencek
07b710f215 Unbreak test_formats 2012-04-11 01:08:45 -05:00
Chad Wilson
abb2dc4cbe Merge branch 'master' into list_scripting_support
Conflicts:
	picard/script.py
2012-01-20 01:28:33 +08:00
Chad Wilson
76faa5b8d7 $setlist -> $setmulti (dont refer to internal data structure in name) 2012-01-20 01:07:06 +08:00
Chad Wilson
38061aeda9 Changed to do nothing on an empty splitter; ValueErrors in the log are annoying. 2012-01-20 00:55:30 +08:00
Chad Wilson
cdddc819bc failUnless -> assert (impending deprecation) 2012-01-20 00:41:58 +08:00
Chad Wilson
4cda132ad1 Add more tests for set and setlist 2012-01-20 00:40:32 +08:00
Wieland Hoffmann
51d2f2e670 fix test_utils 2012-01-16 16:30:15 +01:00