mirror of
https://github.com/beetbox/beets.git
synced 2026-01-09 09:22:55 +01:00
Merge branch 'master' into arogl-master
This commit is contained in:
commit
62772ceece
4 changed files with 13 additions and 8 deletions
|
|
@ -72,7 +72,7 @@ def pil_resize(maxwidth, path_in, path_out=None):
|
|||
im = Image.open(util.syspath(path_in))
|
||||
size = maxwidth, maxwidth
|
||||
im.thumbnail(size, Image.ANTIALIAS)
|
||||
im.save(path_out)
|
||||
im.save(util.py3_path(path_out))
|
||||
return path_out
|
||||
except IOError:
|
||||
log.error(u"PIL cannot create thumbnail for '{0}'",
|
||||
|
|
|
|||
|
|
@ -83,6 +83,9 @@ Fixes:
|
|||
* Improve error reporting: during startup if sqlite returns an error the
|
||||
sqlite error message is attached to the beets message.
|
||||
:bug:`3005`
|
||||
* Fix a problem when resizing images with PIL/Pillow on Python 3.
|
||||
Thanks to :user:`architek`.
|
||||
:bug:`2504` :bug:`3029`
|
||||
|
||||
.. _python-itunes: https://github.com/ocelma/python-itunes
|
||||
|
||||
|
|
|
|||
|
|
@ -800,16 +800,18 @@ class ConfigTest(unittest.TestCase, TestHelper, _common.Assertions):
|
|||
|
||||
self.run_command('test', lib=None)
|
||||
replacements = self.test_cmd.lib.replacements
|
||||
self.assertEqual(replacements, [(re.compile(u'[xy]'), 'z')])
|
||||
repls = [(p.pattern, s) for p, s in replacements] # Compare patterns.
|
||||
self.assertEqual(repls, [(u'[xy]', 'z')])
|
||||
|
||||
def test_multiple_replacements_parsed(self):
|
||||
with self.write_config_file() as config:
|
||||
config.write("replace: {'[xy]': z, foo: bar}")
|
||||
self.run_command('test', lib=None)
|
||||
replacements = self.test_cmd.lib.replacements
|
||||
self.assertEqual(replacements, [
|
||||
(re.compile(u'[xy]'), u'z'),
|
||||
(re.compile(u'foo'), u'bar'),
|
||||
repls = [(p.pattern, s) for p, s in replacements]
|
||||
self.assertEqual(repls, [
|
||||
(u'[xy]', u'z'),
|
||||
(u'foo', u'bar'),
|
||||
])
|
||||
|
||||
def test_cli_config_option(self):
|
||||
|
|
|
|||
6
tox.ini
6
tox.ini
|
|
@ -40,12 +40,12 @@ passenv =
|
|||
deps =
|
||||
{test,cov}: {[_test]deps}
|
||||
py27: pathlib
|
||||
py{27,34,35,36}-flake8: {[_flake8]deps}
|
||||
py{27,34,35,36,37}-flake8: {[_flake8]deps}
|
||||
commands =
|
||||
py27-cov: python -m nose --with-coverage {posargs}
|
||||
py27-test: python -m nose {posargs}
|
||||
py{34,35}-cov: python -bb -m nose --with-coverage {posargs}
|
||||
py{34,35,36}-test: python -bb -m nose {posargs}
|
||||
py3{4,5,6,7}-cov: python -bb -m nose --with-coverage {posargs}
|
||||
py3{4,5,6,7}-test: python -bb -m nose {posargs}
|
||||
py27-flake8: flake8 --min-version 2.7 {posargs} {[_flake8]files}
|
||||
py34-flake8: flake8 --min-version 3.4 {posargs} {[_flake8]files}
|
||||
py35-flake8: flake8 --min-version 3.5 {posargs} {[_flake8]files}
|
||||
|
|
|
|||
Loading…
Reference in a new issue