Adrian Sampson
703f47ae97
Use flexible attribute for track_alt
...
No need for a built-in field for a simple string-type optional field like
this.
2017-01-10 21:01:36 -05:00
Mike Cameron
3cd4f1c091
Fixed failing test where track number was missing from mocked data.
2017-01-10 18:57:42 -05:00
Adrian Sampson
a88682e7bb
Undo from _common import unittest indirection
...
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
2016-11-26 18:46:44 -05:00
Johnny Robeson
10dda13d2a
remove unneeded bytes casting from test_mb
2016-06-12 18:03:08 -04:00
Adrian Sampson
71b9fd785c
Revert "Do __name__ comparison with bytes and not unicode"
...
This reverts commit 9c41c39913 .
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Adrian Sampson
e54c7eec3d
Standardize __future__ imports without parentheses
...
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
a94bfa9eb9
Removed import of unicode_literals from test_mb
2016-02-22 07:40:07 +01:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00:00
Peter Kessen
3eb8008b11
added encoding as comment in files
...
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Adrian Sampson
287f0d8cef
Fix typo and test bug revealed by mock fix
...
Mock used to tolerate a mistyped call like `assert_calledwith` when we meant
`assert_called_with` silently. This seems to be fixed. Fixing the typo
revealed that the assertion was actually wrong, so I fixed that too.
2015-07-13 16:34:09 -07:00
Tom Jaspers
20ae26dd77
Importer metadata source is set as a field: tests
...
See #1311
2015-02-11 10:14:56 +01:00
Bruno Cauet
53c21330c2
All tests use unicode_literals
2015-01-20 15:58:02 +01:00
Bruno Cauet
02d8e88ef1
Replace all mentions of 'str' with 'bytes'
2015-01-20 12:48:15 +01:00
Bruno Cauet
9c41c39913
Do __name__ comparison with bytes and not unicode
2015-01-20 12:03:57 +01:00
Bruno Cauet
90b388b775
Use __future__ imports but unicode_literals everywhere
...
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.
Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
2902cda036
tests: use absolute imports everywhere
2015-01-19 12:25:15 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48
Happy 2015. ;)
...
See 7a410f636b
Command used:
git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Adrian Sampson
6aa9e60756
Add tests for #1029
...
The mbngs library does not like to be called with whitespace-only criteria.
2014-10-24 16:30:14 -07:00
Thomas Scholtes
98ae8cbbc9
Make tests conform to PEP8
2014-09-09 22:31:46 +02:00
Filipe Fortes
ea90321226
Update tests given new alias behavior
2014-03-26 13:01:42 -07:00
Adrian Sampson
787918fdc3
changelog, tests, slight reorg for #187
2013-09-30 11:13:13 -07:00
Adrian Sampson
a5422eeaf7
use track length over recording length
...
Closes #341 . Also, 666 tests! Woohoo!
--HG--
extra : amend_source : f00626f20e2475edcf220772223080ef62f46d84
2013-09-16 17:35:22 -07:00
Adrian Sampson
611dc44c46
fix tests for ID parsing ( #291 )
...
The previous tests accessed the network. This refactoring lets us test the ID
parsing in isolation.
2013-05-29 14:51:16 -07:00
Johannes Baiter
ad66b8796a
Fix tests for albums from manual ID
2013-05-28 13:50:20 +02:00
Sam Doshi
8394619b99
add unit tests for aliases ( #102 )
2013-02-27 09:17:42 +00:00
Adrian Sampson
e0bb3b5cd0
original_{year,month,day,date} fields (GC-441)
2013-02-08 13:28:51 -08:00
Adrian Sampson
50a89e790c
both release and release group disambig ( #87 )
...
This joins the two strings with a comma if both are present.
2013-02-02 12:42:53 -08:00
Peter Schnebel
663574c7ff
Adapted test to pull request #87
2013-02-01 18:10:11 +01:00
Adrian Sampson
7a410f636b
happy new year ✨
...
For future reference, this command did the trick:
ack -l 'Copyright 201' | xargs perl -pi -E 's/Copyright 201./Copyright 2013/'
2013-01-11 10:43:41 -08:00
Adrian Sampson
98d46be4a5
include global index in TrackInfo objects
2012-06-29 14:06:28 -07:00
Adrian Sampson
c0da62c2b7
multi-artist sort names
2012-05-19 16:35:52 -07:00
Adrian Sampson
1387f30295
parse artist credits from MB responses (GC-286)
2012-05-19 15:42:08 -07:00
Adrian Sampson
b68e87b92c
The Great Trailing Whitespace Purge of 2012
...
What can I say? I used to use TextMate!
2012-05-13 20:22:17 -07:00
Adrian Sampson
ed495765e2
tolerate missing language from MB ( #373 )
2012-04-10 11:38:45 -07:00
Adrian Sampson
4fdebcff2d
parse & apply new set of fields
2012-04-04 09:13:26 -07:00
Adrian Sampson
2f1ac61d4f
track and album artist sort names (GH-25, GC-77)
...
Previously, there was just an "artist sort name" field -- now there's a
corresponding sort name for both track artists and album artists. I also made
the names shorter (artist_sort and albumartist_sort).
2012-03-25 17:02:52 -07:00
Adrian Sampson
7522468f0e
set disc and disctotal when autotagging ( #226 )
2012-02-07 18:03:31 -08:00
Adrian Sampson
5a0105b12c
fall back to unittest2 ( #275 )
2012-01-31 15:25:09 -08:00
Adrian Sampson
47891b00f7
tolerate per-medium track numbering ( #283 )
2012-01-25 20:12:04 -08:00
Adrian Sampson
02402545e0
get original release date for MB release group ( #65 )
2011-11-13 16:30:49 -08:00
Adrian Sampson
adbfd06682
embed python-musicbrainz-ngs; beets is now on /ws/2
2011-10-23 18:20:01 -07:00
Adrian Sampson
95f38dbe52
"info dictionaries" replaced with AlbumInfo and TrackInfo
2011-10-23 14:12:13 -07:00
Adrian Sampson
2e2c1be1bd
catch MB BadStatusLine errors
2011-09-18 17:09:20 -07:00
Adrian Sampson
43a5e913a7
move some reused testing stuff to _common module
2011-03-23 16:15:18 -07:00
Adrian Sampson
f69f69cecf
merge in some fixes from wlof's repository
2011-03-23 15:50:11 -07:00
Adrian Sampson
ecdcd1e1bf
use timecop for MusicBrainz error-catching tests
2011-03-23 14:42:29 -07:00
wlof
7be77a99d9
.. is now inserted at the beginning of sys.path so that local beets
...
files are used instead of installed ones
2011-03-19 01:45:35 +01:00
Adrian Sampson
2360c5744a
retry on MusicBrainz error 504 (gateway timeout)
2011-03-03 15:25:16 -08:00
Adrian Sampson
5437b30688
strip null characters from MB queries ( #142 )
2011-02-28 10:08:09 -08:00
Adrian Sampson
eb1a6c8ae3
tests for multiple paths feature; legacy path_format overrides
2011-01-24 19:40:09 -08:00