Johnny Robeson
02680eba59
bytestringify a few more paths in test_importer
2016-07-02 01:52:00 -04:00
Johnny Robeson
24ae4bb056
encode path as utf-8 for is_path_query tests
...
is_path_query is not supposed to accept bytestrings
2016-07-02 01:24:25 -04:00
Adrian Sampson
6919d6980f
Fix path types in test_unicode_path
...
This is lifted directly from 658e814ad718610004cbe6d865c8f2f62e676ffb.
2016-07-01 21:54:37 -07:00
Adrian Sampson
30a172fff3
Properly handle exceptions in custom tag tests
2016-07-01 21:29:50 -07:00
Johnny Robeson
9020dc1f45
use text_string() in a few places for io output
2016-07-02 00:03:46 -04:00
Johnny Robeson
45727c56e2
treat DummyIO as text on py3
2016-07-02 00:03:46 -04:00
Johnny Robeson
aa0a0a0f22
use util.py3_path for confit and env paths in tests
2016-06-30 22:24:17 -04:00
Johnny Robeson
dd729f0ce8
mark more paths as bytestrings in tests
2016-06-30 22:21:56 -04:00
Adrian Sampson
c532860613
Apply simple type consistency changes from #2096
...
These are the changes from that PR that just enforce the path type invariants
we already want---they're a good idea regardless of Python 3.
2016-06-30 14:22:16 -07:00
Johnny Robeson
75c226bd37
remove pathlib tests that just test pathlib itself
2016-06-30 02:09:52 -04:00
Johnny Robeson
ecfda77f5a
bytestringify a few more paths in tests
2016-06-30 00:08:38 -04:00
Adrian Sampson
f3df7b5dd3
Merge pull request #2095 from beetbox/pipeline_invalidation_workaround
...
Workaround for a race condition on queue invalidation
2016-06-29 10:48:48 -07:00
Adrian Sampson
d5205915cc
Avoid dangerous string conversions ( #2094 )
...
This rolls back the places in #2094 where `six.text_type(s)` was used where
`s` might be a bytestring. We almost never want that conversion, because it
uses the default encoding (almost always ASCII). The need for it indicates a
problem somewhere else, where bytes were produced when we were expecting
unicode strings.
2016-06-29 10:30:26 -07:00
wordofglass
ebf44fd6cd
Workaround for a race condition on queue invalidation, Issue #2078
2016-06-29 18:22:44 +02:00
Adrian Sampson
44e0e44108
Enforce type of ID3 desc fields
2016-06-28 20:22:58 -07:00
Adrian Sampson
890b9e81e3
Fix #2089 : correct permissions configuration
...
This reverts the change in 44380db6e8 , where we
lost the ability to "reinterpret" decimals in the YAML configuration file as
octal permissions values.
2016-06-28 10:51:13 -07:00
Christoph Reiter
629241efd3
mediafile: Cleanup mutagen error handling
...
Instead of the individial mutagen format exceptions use the
mutagen.MutagenError exception introduced in 1.25.
Since 1.33 mutagen will only raise MutagenError for load/save/delete
and no longer raise IOError. Translate both errors to UnreadableFileError
to support older and newer mutagen versions. Unify error handling
in __init__(), save() and delete().
Since it's no longer possible to get an IOError from MediaFile, adjust
all callers and tests accordingly.
This was tested with mutagen 1.27 and current mutagen master.
2016-06-28 16:43:34 +02:00
Christoph Reiter
06072c5d7d
tests: Fix setup.py test
...
test_hidden was missing suite() which made testall.suite() fail
2016-06-27 10:23:34 +02:00
Adrian Sampson
5efd5b21c5
Use new as_str method
...
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Adrian Sampson
e16cc58cb9
Walk back some six.iter* uses
...
In places where it doesn't much matter whether we use an iterator or the old
Python 2 list way, using the six name just hurts legibility.
2016-06-25 18:29:55 -07:00
Adrian Sampson
736ad66518
Merge pull request #2066 from beetbox/use-six
...
Use the six package to handle py2/p3 compatibility
2016-06-25 18:09:56 -07:00
wordofglass
86ed8e9650
Merge pull request #2072 from beetbox/art_rectify_extension_via_imghdr
...
Rectify artwork extension via imghdr
2016-06-25 22:06:32 +02:00
wordofglass
2db1530ef8
fetchart: flake8 fixes
2016-06-25 21:55:55 +02:00
wordofglass
697291b04e
fetchart: improve error resilience of the Content-Type detection by file magic
2016-06-25 14:10:50 +02:00
Johnny Robeson
34074b530b
check changed text on py >3.5 in RegexpQuery test
...
See https://bugs.python.org/issue22364 for details
2016-06-24 19:09:29 -04:00
Johnny Robeson
433ac368df
check pull.__next__ on py3 in pipeline tests
2016-06-24 05:53:56 -04:00
Johnny Robeson
8c2809f75c
only write StringIO encoding attr on py2
2016-06-24 05:53:56 -04:00
Johnny Robeson
6849ab874e
skip pipeline test_constrainted_exception on PY3
...
This one would make every test run last until the timeout is reached, so
it's necessary skip it until the root cause is found.
2016-06-24 05:53:56 -04:00
Johnny Robeson
36ed75cd01
use reraise from six
2016-06-24 05:53:55 -04:00
Johnny Robeson
edb1cbc5fc
replace iter{items|values} with six.iter{items|values}
2016-06-24 05:53:55 -04:00
Johnny Robeson
e57b7faf69
replace basestring with six.text_types
2016-06-24 05:53:55 -04:00
Johnny Robeson
e8afcbe7ec
replace unicode with six.text_type
2016-06-24 05:53:49 -04:00
wordofglass
c789d31614
fetchart: fix and add tests for the new behaviour
2016-06-23 17:38:01 +02:00
Johnny Robeson
7b66dfec4b
use renamed test assertions from six
2016-06-23 04:40:18 -04:00
Johnny Robeson
5f4678e3e8
use StringIO from six
2016-06-23 04:40:18 -04:00
Johnny Robeson
4649226b9b
use urllib from six.moves
2016-06-23 04:40:18 -04:00
Adrian Sampson
d3928008e1
Merge pull request #2068 from beetbox/fetchart_mime_extension
...
Fix fetchart hardcoding the image extension
2016-06-22 10:19:12 -07:00
Johnny Robeson
0b17666b55
Revert "check for encoding attr before set in test_helper"
...
This doesn't actually help us, since the property is there, but not
writeable
This reverts commit 4c98edc588 .
2016-06-22 00:51:10 -04:00
Johnny Robeson
4c98edc588
check for encoding attr before set in test_helper
...
This makes it work equivalently in py2 and py3
2016-06-21 23:44:24 -04:00
Adrian Sampson
133c82b1ab
Fix #2063 : properly decode format CLI argument
2016-06-21 15:15:24 -07:00
Adrian Sampson
5909c9ee89
Fix #2051 : don't try to sort None
...
I found the point in the test harnesses where None was introduced as a value
for `TrackInfo.index`. Just using zero works fine.
2016-06-21 15:02:05 -07:00
Adrian Sampson
351b6f8c9d
Remove raw Unicode literals ( fix #2069 )
...
PEP 414 didn't add `ur"..."` literals to Python 3. So for hybrid 2/3
compatibility, these had to be replaced with ordinary Unicode string literals.
This was only painful for one string; the others were only raw strings by
convention. (All were regexes.)
2016-06-21 14:29:14 -07:00
wordofglass
08c9bd84d8
fetchart: testcase for wrong server-side extensions ( #2053 )
2016-06-21 02:30:20 +02:00
Johnny Robeson
66431ab4de
treat tag values as strings in ReadWriteTestBase
2016-06-17 23:58:35 -04:00
Johnny Robeson
a1609ec548
use strings for *StorageStyle keys, not bytes
2016-06-17 23:39:17 -04:00
Johnny Robeson
93e510c1c7
remove an unnecessary b' in test_fetchart
2016-06-17 05:26:21 -04:00
Johnny Robeson
fda3911323
bytestringify touch call in PathQueryTest
2016-06-17 02:00:20 -04:00
Johnny Robeson
4bbfe85c66
is_path_query takes unicode, so do that test_query
...
This fixes all but one instance that I'm not yet sure how to fix
2016-06-17 01:48:47 -04:00
Johnny Robeson
a0a9e2f22d
mark itunes library files as bytestrings
2016-06-17 01:40:16 -04:00
Johnny Robeson
60a961a751
remove an unnecessary .encode() in create_item_fixture
2016-06-17 01:20:42 -04:00