Commit graph

1597 commits

Author SHA1 Message Date
Johnny Robeson
a274b4e737 read and write the pickled statefile as binary
Pickle files should be treated as binary files
2016-06-10 02:02:28 -04:00
Jack Wilsdon
26a17a3703 Remove trailing whitespace added in a45dcdc 2016-06-09 19:23:54 +01:00
Adrian Sampson
0f8fc33952 Fix inverted assertion sense
I broke this in 2fefd24 by using the wrong assertion.
2016-06-09 10:23:24 -07:00
Adrian Sampson
a45dcdc674 Fix Windows env vars for config test 2016-06-09 09:58:10 -07:00
Adrian Sampson
e508daea63 Use syspath for existence checks 2016-06-09 09:43:24 -07:00
Adrian Sampson
2fefd2471a Use our higher-level assertions for files 2016-06-09 09:39:44 -07:00
Adrian Sampson
9717940c9b Cross-platform relative path in test 2016-06-08 23:03:45 -07:00
Adrian Sampson
2c7e7d7727 Portable paths in mpdstats tests 2016-06-08 12:59:45 -07:00
Jack Wilsdon
3f8a85c825 Add tests for force deletion (without input) 2016-06-08 19:26:42 +01:00
Jack Wilsdon
34b3cf36b7 Add --force option to beet remove 2016-06-08 19:22:24 +01:00
Adrian Sampson
847c3bbfef Don't test absolute paths as queries on Windows 2016-06-08 10:41:32 -07:00
Adrian Sampson
bea77370c4 Simpler absolute path detection test 2016-06-08 10:34:21 -07:00
Adrian Sampson
416593fbf8 Split path detection tests 2016-06-08 10:31:05 -07:00
Adrian Sampson
f79daacb7b Fix a hard-coded path separator in a test 2016-06-08 10:23:35 -07:00
Adrian Sampson
f400a2431e fetchart: Fix path types on Windows 2016-06-08 10:20:25 -07:00
Adrian Sampson
93e614c739 Tests for _{in,out}_encoding (#2041) 2016-06-08 09:47:45 -07:00
Johnny Robeson
790b1b5153 replace some filter/map calls with list comps
These are places where the surrounding/calling code needs a list, not an iter.
2016-06-08 00:17:18 -04:00
Johnny Robeson
be474b3f52 wrap a call to filter in a list()
There are other filters like this in the master branch, but
2to3 converts them into list comprehensions. We'll deal with those
later
2016-06-06 17:26:06 -04:00
Adrian Sampson
8b62aa828c Fix KeyFinder test assertion 2016-06-06 12:17:17 -07:00
Adrian Sampson
94372e87a8 Merge branch 'master' of github.com:sampsyo/beets 2016-06-06 11:54:33 -07:00
Adrian Sampson
90f4c77ea0 Skip permissions tests on Windows 2016-06-06 11:54:23 -07:00
Adrian Sampson
2322962cf8 Fix another sys.platform check 2016-06-06 11:51:32 -07:00
Adrian Sampson
8bf1f868fa Fix comparison in a library type test 2016-06-06 11:46:51 -07:00
Adrian Sampson
a5b7489dd1 Use new assertion in config tests 2016-06-06 11:40:04 -07:00
Adrian Sampson
8359b9e90f Tests: path equality assertion 2016-06-06 11:30:38 -07:00
Adrian Sampson
1c1c73b062 Check for convert failures 2016-06-06 11:01:10 -07:00
Adrian Sampson
ad74da1149 Refactor similarity tests
The upshot is we can now compare the two Popen invocations
independently.
2016-06-06 10:58:25 -07:00
Adrian Sampson
bfa56b1d8d Tests: fix mocking of art.extract 2016-06-06 10:08:30 -07:00
Adrian Sampson
5db8f69bc1 Fix invocation signature for check_art_similarity
The second argument is an Item, not a filename.
2016-06-05 12:37:05 -07:00
Adrian Sampson
746aecad2b Fix a sys.platform check in hidden test 2016-06-05 12:28:47 -07:00
Adrian Sampson
60b4172a59 Tests: don't use None as a path stand-in
This triggered a crash in `syspath` on Windows.
2016-06-05 12:26:51 -07:00
Adrian Sampson
2f9aa41614 Clean up SQLite connections in test harness
Windows complains that we can't remove the test database file if open
connections remain.
2016-06-05 11:56:09 -07:00
Johnny Robeson
9ed9faf246 add some b' to paths in sort tests 2016-06-02 18:52:32 -04:00
Adrian Sampson
2228e0e8e1 More binary-mode open in tests 2016-06-02 11:52:56 -07:00
Adrian Sampson
82640260c2 Tests: don't unload the beetsplug module
This was added in 1666f883e3 back in 2013. I'm
not sure why this *ever* worked to get beetsplug to point to the right
directory, but I believe it was superseded by the path manipulation in
aa07eb9551, added in 2014. And now, it's causing
problems on Windows, where for some reason it's causing `import beetsplug.x`
to silently succeed but yield an empty `beetsplug`, without `x` in the
namespace.
2016-06-02 11:41:25 -07:00
Adrian Sampson
07c95a1bf1 Require an imaging backend for fuzzy ratio tests
These fail outright if we don't have a way to get image sizes (e.g.,
ImageMagick).
2016-06-02 11:39:05 -07:00
Adrian Sampson
e71e17d924 Open image file as binary in tests 2016-06-02 10:17:02 -07:00
Adrian Sampson
9f8b81a5ad Fix variable reference in stub 2016-05-31 18:13:50 -07:00
Adrian Sampson
e8c8f9fb14 Possibly make the convert stub work on Windows 2016-05-31 18:08:26 -07:00
Adrian Sampson
f96aa24a79 Convert stub: use __future__ imports
Even tiny stubs can't escape the wrath of flake8!
2016-05-31 17:55:12 -07:00
Adrian Sampson
fc3f64de95 Convert stub: Python 3 compatibility
Important for systems where `python` is 3.x, like Arch, even when beets itself
is running on Python 2.
2016-05-31 17:52:32 -07:00
Adrian Sampson
40369c6ab2 Move convert stub script to its own file 2016-05-31 17:50:54 -07:00
Adrian Sampson
469aee9848 Correctly encode arguments in tests 2016-05-31 15:32:09 -07:00
Adrian Sampson
9e27c9e5ac Fix duplicated argument in test 2016-05-31 15:19:34 -07:00
Adrian Sampson
17681145c2 Fix a too-long line 2016-05-31 13:52:27 -07:00
Adrian Sampson
6ff7271ea0 Refactor convert command tests
This lets us force the use of explicit path: queries on the command line
instead of implicit path queries. This is more robust and works on
Windows, which currently gets confused when path components start with
`c:`.
2016-05-31 13:46:44 -07:00
Adrian Sampson
5b2fb8dcdc Queries with \ are path queries on Windows 2016-05-31 13:29:00 -07:00
Adrian Sampson
1eb03a0de5 Query tests: use normalized paths
Match ordinary beets behavior by storing normalized paths in the
database. This matters on Windows, where normalization adds backslashes
and drive letters.
2016-05-31 13:12:32 -07:00
Adrian Sampson
33a4767eaf Portable mock command for testing convert plugin 2016-05-31 11:48:29 -07:00
Adrian Sampson
395877d903 Remove the Echo Nest plugin 😢 (#1920) 2016-05-30 22:25:58 -07:00