Commit graph

17 commits

Author SHA1 Message Date
Jesse Weinstein
4d07e45732 Bring test_ftintitle up to 94%
Just need a test for importing.
2016-01-04 01:51:49 -08: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
Amish Bhadeshia
6365a9b538 Added indice into curly brackets, for py26 compatabiity 2015-03-27 20:54:42 +00:00
Amish Bhadeshia
20debd020e Fixed travis errors 2015-03-27 20:45:28 +00:00
Amish Bhadeshia
232ff05766 Added tests and simplified implementation method 2015-03-27 17:59:35 +00:00
Adrian Sampson
14ce6a557e Merge pull request #1183 from marcaddeo/refactor-ftintitle
Refactor ftintitle

Conflicts:
	beetsplug/ftintitle.py
2015-01-31 12:51:15 -08:00
Bruno Cauet
53c21330c2 All tests use unicode_literals 2015-01-20 15:58:02 +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
Marc Addeo
8f41818434 Fix formatting to pass flake8 tests 2014-12-28 20:58:59 -05:00
Marc Addeo
a70820d8a1 Fix a bug in ftintitle with the order of album artist
There was a bug in the find_feat_part function that would cause it to
fail if the album artist was the second part of the featured string.

For example, if the Artist field was Alice & Bob, and the Album Artist
field was Bob it would return None due to the order.

This fixes that and adds test cases to ensure it doesn't return.
2014-12-28 20:23:17 -05:00
Marc Addeo
4d4113e3a4 Refactor ftintitle to extract the code to find the featured artist
This removes the code that extracts the featured artist from the
original artist field from the ft_in_title function and puts it into its
own.

It also adds a custom ArtistNotFoundException that find_feat_part will
throw if the album artist is not in the artist field.

This allows us to easily test the results of finding a featured artist
in the artist sting, and thus adds tests for the usual test cases that
the split_on_feat gets tested for.
2014-12-28 20:15:09 -05:00
Adrian Sampson
c2c1e7236d Simplify word boundaries (#1060)
Use lookahead/lookbehind matching to ensure there is whitespace around the
token. Replaces the use of \b, which doesn't work for "ft.", etc.
2014-12-16 11:49:54 +00:00
Fabrice Laporte
82de2a55bc ftintitle unit tests 2014-12-13 23:35:59 +01:00