Commit graph

64 commits

Author SHA1 Message Date
Adrian Sampson
f400a2431e fetchart: Fix path types on Windows 2016-06-08 10:20:25 -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
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
e54c7eec3d Standardize __future__ imports without parentheses
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
a5ce7a2814 Removed import of unicode_literals from testsuite 2016-02-20 14:46:37 +01: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
Adrian Sampson
a0ff517d17 Guess output encoding from sys.stdout.encoding
Rather than using the locale settings. #1419
2015-04-13 11:11:16 -07:00
Bruno Cauet
adec09de96 Fix outdated docstring in test.TestHelper 2015-03-23 19:15:14 +01:00
Bruno Cauet
69786b8538 Fix test.helper.has_program(): encode command
subprocess.subprocess.check_call() should receive a byte string command
otherwise it fails with a UnicodeDecodeError on systems with non-ascii
elements in the system path.

Discovered while reviewing PR #1344.
2015-03-04 15:05:17 +01:00
Bruno Cauet
f1e13cf886 Offer verbose and very verbose modes
'verbose' is now an int and not a boolean. '-v' is level 1, '-vv' level
2. In the configuration it can be set with 'verbose: 1' or 'verbose: 2'.

Improve #1244: auditing current log levels of plugins remains.
2015-02-10 17:13:15 +01:00
Tom Jaspers
3ec44aab3e Update _types field instead of assigning it
Assigning it would override our pre-defined types
(such as `path` in Album._types)
2015-02-06 10:42:46 +01:00
Thomas Scholtes
482008bf1d Info plugin can filter properties in output
Resolves #1287
2015-02-01 21:51:26 +01:00
Tom Jaspers
927a53d59b Merge pull request #1281 from tomjaspers/configurable-colors
Colors are now user configurable.

Conflicts:
	beets/ui/__init__.py
	beets/ui/commands.py
2015-01-30 13:48:19 +01:00
Tom Jaspers
e7378c77a7 Fix tests to use config['ui']['color'] instead of top-level color 2015-01-29 14:04:37 +01:00
Bruno Cauet
268dcb0008 test.helper.log_capture() unicode handling
Except unicode message instead of bytes.

Fix #1253
2015-01-21 19:18:57 +01:00
Bruno Cauet
152e93136b test._common and test.helper use unicode literals 2015-01-20 15:52:47 +01:00
Bruno Cauet
afb1611cf2 Fix test.helper __future__ imports 2015-01-20 12:51:27 +01:00
Bruno Cauet
02d8e88ef1 Replace all mentions of 'str' with 'bytes' 2015-01-20 12:48:15 +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
Bruno Cauet
8418fb6083 Use a standard logger for the import log
The import log now relies on a standard logger, named 'beets.importer'
and configured upon initialization of the import session.
2015-01-12 21:47:44 +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
Bruno Cauet
30f158a95e Move "from beets import logging" statements
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet
7df8bef8b7 Update logging imports: logging → beets.logging 2015-01-04 17:02:27 +01:00
Thomas Scholtes
b33d5b577a Catch exception when program check has non-zero return code
See #1175.
2014-12-29 12:07:57 +01:00
Thomas Scholtes
e2b2a505fc zero: Can delete embedded images
Fixes #1100.
2014-12-01 17:33:45 +01:00
Adrian Sampson
42228e6d82 Tests: fix unload_plugins
Don't mutate the base classes. This was causing plugins to break on the second
test that uses them, since after they were unloaded their class-level fields
were broken (since the modules are not re-loaded).

This makes it more clear than ever that we need to encapsulate plugin loading
state using some manner of PluginManager.
2014-11-24 10:58:32 -08:00
Thomas Scholtes
d0ac66bfe6 Fix oldstyle object initializer for py26 2014-09-18 16:51:11 +02:00
Thomas Scholtes
1e45ba597d embed_item function does not raise if image file not found
Fixes #968
2014-09-18 16:19:05 +02:00
Thomas Scholtes
3fe52a7694 Add test helpers to create database fixtures 2014-09-14 14:16:34 +02:00
Thomas Scholtes
d4f72f62eb echonest: set types for flexible fields
Conflicts:
	beetsplug/echonest.py
2014-09-14 12:34:46 +02:00
Thomas Scholtes
89c82dc63d fetchart: correctly handle path encoding
* Ensure that `config.as_str_seq()` returns a list of unicode objects.
* Map these to bytestring paths so we can compare them to other paths.

Fixes #887
2014-09-13 16:49:34 +02:00
Thomas Scholtes
0bb6348df3 fetchart: Add test that reproduces #887 2014-09-13 16:39:39 +02:00
Thomas Scholtes
fc5f2126bb Add test helper for adding items 2014-09-11 22:47:55 +02:00
Thomas Scholtes
3ce5dda0c9 Failing tests for empty import directories
Reproduces #932.
2014-09-06 18:52:57 +02:00
Thomas Scholtes
b278db42be info: print library fields and sort output 2014-08-25 23:47:16 +02:00
Thomas Scholtes
a9f839bbf8 info: Specify files through library query 2014-08-25 23:01:02 +02:00
Adrian Sampson
61416da0a7 Better isolation for ConfigTest 2014-08-19 12:27:35 -07:00
Adrian Sampson
4eb23f7c06 Update tests for #900 2014-08-18 22:26:17 -07:00
Thomas Scholtes
0f2a9bdcdc Record singletons for incremental import
We still need to implement this for flat imports, archives and toppath
singletons. Fixes #860.
2014-07-31 11:09:16 +02:00
Thomas Scholtes
f19fa1567e Test converter embeds album art 2014-06-02 17:09:16 +02:00
Adrian Sampson
e9355f336b Rename remove_duplicates and do_remove_duplicates 2014-04-26 20:21:20 -07:00
Thomas Scholtes
0518d4e265 Add tests for duplicate album imports 2014-04-19 15:23:01 +02:00
Thomas Scholtes
bd047ec6c8 Add tests for resumed import 2014-04-17 21:56:15 +02:00
Yevgeny Bezman
bbb1f7a295 tests: made all tests pass on cygwin. Fixes #655 2014-04-17 19:50:59 +03:00
Thomas Scholtes
a6aed22ddd Flake8 fixes 2014-04-17 12:25:59 +02:00
Thomas Scholtes
ea04344560 Test and fix unicode issues in logs. Fixes #699
The helper functions for creating test fixtures now include unicode characters.
2014-04-17 12:12:49 +02:00
Thomas Scholtes
d02dec8364 Test albums and singletons simultaneously 2014-04-16 14:50:57 +02:00
Thomas Scholtes
8057830c01 Test mbsync plugin
Exposes bug from #693
2014-04-16 14:01:00 +02:00