Commit graph

8574 commits

Author SHA1 Message Date
Carl Suster
eb5c7513a1 BPD tests: fix GstPlayer mock 2019-03-31 10:46:14 +11:00
Carl Suster
2a2d9b5c98 BPD tests: explicitly close client socket 2019-03-31 10:46:14 +11:00
Carl Suster
a6c976b880 BPD tests: small code reformatting 2019-03-31 10:46:14 +11:00
Carl Suster
3eaf0f7a19 BPD tests: use canonical capitalisation of tags 2019-03-31 10:46:14 +11:00
Carl Suster
4c627cbacb [skip travis] BPD tests: add items by path 2019-03-31 10:46:14 +11:00
Carl Suster
dfc5da70cd BPD tests: avoid os.fsdecode new in Py3.2 2019-03-31 10:46:14 +11:00
Carl Suster
14d0cc3b85 BPD tests: be more careful with paths 2019-03-31 10:46:14 +11:00
Carl Suster
7c8bbd3011 BPD tests: avoid Py3.7-only mp.Process.kill 2019-03-31 10:46:14 +11:00
Carl Suster
35bf041ad0 BPD tests: fork and launch beets 2019-03-31 10:46:14 +11:00
Carl Suster
c42c0c06bc BPD tests: fix CI failures 2019-03-31 10:46:14 +11:00
Carl Suster
2286c0ce7b BPD tests: run bpd in a subprocess 2019-03-31 10:46:14 +11:00
Carl Suster
767441d5d5 BPD tests: improve test helpers
Decode the bytes to strings: the MPD protocol specifies that the
communications are all in UTF-8.

Also parse the body into a dict since this is typically more convenient
than having to do it manually in each test.
2019-03-31 10:46:14 +11:00
Carl Suster
d9537f27dc BPD tests: fix CI failures 2019-03-31 10:46:14 +11:00
Carl Suster
76221428f8 Add a DummyIn::close no-op implementation
The BOD tests are currently forking a process with a server running, and
this attempts to close stdin. Tests were failing due to DummyIn not
implementing the close() method. Adding this simple no-op does the trick
to allow forking and seems like a harmless addition.
2019-03-31 10:46:14 +11:00
Carl Suster
5d2b883b72 BPD tests: test several simple commands 2019-03-31 10:46:14 +11:00
Carl Suster
7302cd6ab5 BPD tests: test helper for BPD batch commands
The MPD protocol allows batching commands. There are two choices for the
first message that announced a batch is starting, and we just go for the
one that causes the server to respond with a marker message between each
individual response, since that's easier. This might need to be tweaked
in order to test the behaviour with the other batch indicator.
2019-03-31 10:46:14 +11:00
Carl Suster
9a5be1f971 BPD tests: test supported tag types
MPD now supports more fields ("tags") than what BPD advertises. Fixing
this should be a simple task of extending the mapping of fields to tags
in BPD's implementation.
2019-03-31 10:46:14 +11:00
Carl Suster
acd66ce560 BPD tests: run BPD Server with a fake gstplayer 2019-03-31 10:46:14 +11:00
Carl Suster
acc3f3efb0 BPD tests: check all specified commands known
The current MPD spec is several versions ahead of BPD. These tests just
compare the full specified list of commands against what BPD claims to
support (without actually testing their implementations). It's handy as
a measure of progress against the specification, but can perhaps be
dropped later once all of the individual protocol methods have tests.
2019-03-31 10:46:14 +11:00
Carl Suster
59e66aaa7f BPD tests: password command 2019-03-31 10:46:14 +11:00
Carl Suster
078c583434 BPD tests: add basic test framework
A simple TCP client wraps the low level protocol to allow testing of the
BPD server as a black box.
2019-03-31 10:46:14 +11:00
Adrian Sampson
15f86c411e Appveyor: fix version specifier syntax 2019-03-30 12:57:51 -04:00
Adrian Sampson
9b3bebfcd7 Travis: fix shell syntax for version specifier 2019-03-30 12:48:34 -04:00
Adrian Sampson
db107e3c46 Appveyor: temporarily pin tox version
As in 777cfbbf61 for Travis.
2019-03-30 12:40:52 -04:00
Adrian Sampson
ccbab10090 Add the full set of __future__ imports in new file 2019-03-30 12:39:42 -04:00
Adrian Sampson
777cfbbf61 Travis: temporarily pin tox to <=3.8.1
To avoid a Python 2 bug introduced in tox 3.8.2 but not fixed yet:
https://github.com/tox-dev/tox/issues/1234
2019-03-30 12:37:53 -04:00
Adrian Sampson
9abfc45adc Changelog issue link for #3189 2019-03-26 22:11:12 -04:00
Adrian Sampson
f842551915
Merge pull request #3189 from jroitgrund/dont-move-album-art-twice
beets update: dont move album art twice
2019-03-26 22:10:08 -04:00
jroitgrund@gmail.com
31b393586a Changelog 2019-03-27 01:43:42 +00:00
jroitgrund@gmail.com
ea307f62d1 Don't move album art twice 2019-03-27 01:41:42 +00:00
Heinz Wiesinger
29425edff4
Merge pull request #2798 from pprkut/query_perf
Small performance optimization when fetching items from library.
2019-03-23 20:54:58 +01:00
Heinz Wiesinger
7c568aa528 Account for items that do not have flexible attributes 2019-03-23 20:22:23 +01:00
Heinz Wiesinger
5494c8b260 Improve documentation 2019-03-23 20:22:23 +01:00
Heinz Wiesinger
31ec222e0e Query flexible attributes already in _fetch()
This resolves the query length and potential security problems,
while keeping the performance benefits.
2019-03-23 20:22:23 +01:00
Heinz Wiesinger
1e1ddd276e Small performance optimization when fetching items from library.
Fetch flexible attributes once for all items instead of once per
item. For queries with larger result sets this drastically cuts
down the number of issued sqlite queries.
2019-03-23 20:22:23 +01:00
Adrian Sampson
572835c1f7
Merge pull request #3187 from jroitgrund/patch-1
Clarify description of incremental_skip_later
2019-03-23 12:22:55 -04:00
jroitgrund
6a8444a3fd
Further clarify 2019-03-23 15:03:57 +00:00
jroitgrund
a46d5282be
Clarify description of incremental_skip_later 2019-03-23 14:57:56 +00:00
Adrian Sampson
6ee824fb0f Fix #3184: AttributeError in error handler 2019-03-14 09:53:32 -04:00
Adrian Sampson
e09e697607 Changelog/thanks for #3092 2019-03-13 20:54:42 -04:00
Adrian Sampson
7d8524deab Merge pull request #3092 from zhelezov/2826-deprecation-warnings
Fix #2826
2019-03-13 20:53:41 -04:00
Adrian Sampson
1e075675d0
Merge pull request #3179 from malan88/patch-1
Improve specifications in the matches.ignored setting
2019-03-07 10:56:49 -05:00
malan88
d1ba56e246
Simplify wording, exclude ref to distance_weights
Per conversation with Adrian, simplify the wording of the change.
2019-03-07 10:41:37 -05:00
malan88
2cef079603
Improve specifications in the matches.ignored setting
The setting is quite confusing. After having difficulty getting the autotagger to accept an id for a specific release that I knew was correct, I investigated and count [this closed issue][0] that totally explains the problem.

To clarify the issue, I quoted Adrian from the issue and elaborated a bit, providing the solution. Unfortunately, the solution is undocumented. I'd like to document it, but I am unsure what the actual weighting system in `distance_weights` is. Adrian says 0.9 to ignore missing_tracks, which implies it's similar to the distance weighting in the other settings, but other settings in the default config are set to multiples of 1, implying it is not.

[0]: https://github.com/beetbox/beets/issues/3064
2019-03-07 09:39:34 -05:00
Vladimir Zhelezov
8ae2b474cb Move ArgSpec declaration to module level 2019-03-06 08:18:28 +01:00
Vladimir Zhelezov
520befb30a Fix #2826: introduce beets.util.inspect wrapper 2019-03-05 08:31:44 +01:00
Vladimir Zhelezov
3eb5907da8 Merge branch 'master' of https://github.com/beetbox/beets into 2826-deprecation-warnings 2019-03-04 21:01:19 +01:00
Adrian Sampson
f6ad98a4a5
Merge pull request #3167 from jackwilsdon/fix-hook-unicode
Fix hook byte string interpolation
2019-02-25 11:09:12 -05:00
Adrian Sampson
9f2c7727cd
Merge pull request #3169 from beetbox/munkres-versions
More complex version dependencies for munkres
2019-02-25 11:08:29 -05:00
Adrian Sampson
f312b1f0b7 Fix #3168: several versions of munkres
Require different version constraints for Pythons <3.5, =3.5, and >3.5.
2019-02-25 10:06:14 -05:00