Commit graph

17 commits

Author SHA1 Message Date
Johnny Robeson
c52394c499 fix the rest of b'__main__': 2016-05-30 01:11:37 -04: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
ccc61a638e Removed unicode_literals from test_util 2016-02-25 07:53:20 +01:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Adrian Sampson
6958f83dd6 Fix test for richer CalledProcessError 2015-11-23 22:55:51 -08: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
e3f7da5467 Update test for simpler interactive_open 2015-11-14 13:26:04 -08:00
nath@home
9c663432bd Refactor util/interactive_open: multiple targets
interactive_open should now be invoked with at least the list of
targets and optionally the command to open the targets with.
This allows beets-play to pass multiple file paths directly to
the configured command.

The changes to the existing invocations are pretty trivial in
order to comply to this refactor.
2015-09-01 23:42:42 +02:00
Bruno Cauet
5e26d483a8 Replace deprecated assertEquals with assertEqual. 2015-04-01 10:48:03 +02:00
Bruno Cauet
02855a44bd Fix exception construction in util.command_output()
`cmd` being a byte string array, it should be joined by b" " and not
u" ".
2015-03-13 11:51:26 +01:00
Bruno Cauet
c47221555f Add beets.util.interactive_open() find cmd + execute
interactive_open() takes a target and an optional command, if it does not
receive a command then it uses open_anything().

It parses command and lexes it with shlex.split(), revieling the client
from that task.

"config -e" command uses it, and gives a better error message in case of
problem. "play" plugin uses it as well, as side-effect being that the
command is now interactive, as requested in issue #1321.

Fix issue #1321.
2015-02-16 12:26:17 +01:00
Bruno Cauet
489b6b2e7e Move many tests from test_library to test_util
Sice they only test functions from beets/util/__init__.py there's not
reason for them to reside in test/test_library.py.
2015-02-16 11:53:01 +01:00
Bruno Cauet
5d9128aff3 util.interactive_open() return open/xdg-open/start
Depending on the platform return the correct automatic execution
command.
2015-02-16 11:35:13 +01:00
Adrian Sampson
323be89d4d fold OrderedEnum into autotag module
This puts the OrderedEnum generic class next to where it is actually used. It
also refers to the recipe it is taken from on docs.python.org. I also took the
opportunity to give this a capitalized name (since it's a proper type).
2014-04-08 17:10:50 -07:00
Adrian Sampson
443b8089d5 remove unnecessary IndexableEnum
This is not really critical since list(Type)[i] works just as well. This fixes
a couple other problems from the enum transition:
- The name of TYPES was not really consistent with its new role as an enum
  type. Renamed this ImageType.
- Fix a rather egregious bug in embedart (undefined reference to Image).
2014-04-08 16:59:50 -07:00
Kyle Konrad
7f3092ce5a four space indentation and assertGreater for __gt__ coverage 2014-04-03 12:04:51 -07:00
Kyle Konrad
142374925f add util test file with tests for enumerations. fix super() bug 2014-04-02 15:31:28 -07:00