Commit graph

170 commits

Author SHA1 Message Date
Peter Kessen
7b2de49274 added test for abort of modify action 2016-01-28 19:03:33 +01:00
Peter Kessen
a707715b81 added testcase with no write and no move
improves coverage
2016-01-28 18:59:46 +01:00
Peter Kessen
e0ffae3be0 added test case for Modify without any change 2016-01-28 18:59:34 +01:00
Peter Kessen
8954f1a494 split of modify function in modify_test 2016-01-28 18:59:11 +01:00
Peter Kessen
c7fff52324 Fixed bug when running subset of testcases
Happens when invoking `tox -e py27 test.test_ui` directly.
`os.environ.get('HOME')` seems to return None and raises an Exception
in tearDown of class
2016-01-27 19:12:49 +01:00
Adrian Sampson
a07cb837aa Fix #1826: include test_completion.sh in sdist 2016-01-22 15:25:43 -08:00
Adrian Sampson
a18d0e4b3b Make bash-completion test more robust
I found some infelicities while investigating #1826. This test was hard-coding
a specific path for bash-completion, which was the wrong one for my system, so
it was being skipped every time. This searches the list of paths used by the
actual command.
2016-01-22 15:22:48 -08:00
Jesse Weinstein
72ce9ea3eb use underscore in name for pep-8s sake 2016-01-12 22:14:12 -08:00
Jesse Weinstein
d93f723263 Convert SKIP_SLOW_TESTS to its own decorator 2016-01-12 21:53:52 -08:00
Jesse Weinstein
760298b8e4 Mark slow tests to be skipped if SKIP_SLOW_TESTS env var is defined
Saves over 100 seconds.
2016-01-10 23:18:47 -08:00
Jesse Weinstein
1111ab9fdf Add tests for stats and version 2016-01-06 01:02:07 -08:00
Jesse Weinstein
28257db654 Add test for help command 2016-01-05 00:03:34 -08: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
Peter Kessen
b980c60941 corrected another testcase for previous commit 2015-09-29 17:40:57 +02:00
Tom Jaspers
be484f2af0 Implement --pretend option for the move command
The method `show_path_changes` takes a list of tuples (source, destination)
that will be printed on either single / double line, as proposed in #1405.
2015-05-20 13:03:18 +02:00
Bruno Cauet
8e25a70e40 summarize_items(): sort format by decr. freq
Make the summary deterministic.
2015-03-16 14:41:43 +01:00
Bruno Cauet
1e2d481ac0 Add tests for summarize_items() 2015-03-16 14:29:09 +01:00
Bruno Cauet
167f067961 Improve behavior of --path: store_true-like
Availability of the 'path' presence in arguments can be important for
some plugins such as duplicates, and therefore should be conserved.
2015-03-05 17:40:32 +01:00
Bruno Cauet
38ca99498d Bypass sequential args. parsing for --album
When setting format and using --album we *need* to know whether we're in
album mode. Naively if --album happens after "--format fmt" then we'll
set Item format instead of Album format.
By looking forward for -a/--album we bypass that problem.
2015-03-05 16:42:33 +01:00
Bruno Cauet
5623d26a91 Add tests for the CommonOptionsParser
Unit test both the features & do real behaviour tests with the 'list'
command.
2015-03-05 16:42:03 +01:00
Tom Jaspers
12ecb2ce35 Fix formatting to new PEP8 version (1.6.2)
PEP8 1.6.2 (2015-02-15):
- added check for breaking around a binary operator

This caused Travis to fail on "W503 line break before binary operator"
2015-02-16 18:21:56 +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
Adrian Sampson
790c41a73d write: Do not try to write non-writable fields
Fix #1268.
2015-01-27 15:03:19 -08:00
Adrian Sampson
b8dab9cf9f Merge pull request #1247 from brunal/future
Use all __future__ imports in beets core

Conflicts:
	beetsplug/web/__init__.py
	test/test_embedart.py
2015-01-26 17:02:07 -08:00
Bruno Cauet
4e904c78af Simplify LibModel format management
Delete `ui.format_` and then `ui.print_obj`. Simply ensure that when
there is no format it defaults to '' = default format = config option.
2015-01-26 23:09:56 +01:00
Bruno Cauet
02d8e88ef1 Replace all mentions of 'str' with 'bytes' 2015-01-20 12:48:15 +01:00
Bruno Cauet
9c41c39913 Do __name__ comparison with bytes and not unicode 2015-01-20 12:03:57 +01:00
Bruno Cauet
8dd7bf0f0b unicode_literals in beets.ui and beets.autotag
Well, that was easy!
2015-01-19 17:18:50 +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
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
Thomas Scholtes
84acf17855 Test that mtimes are updated when writing files
Follows the discussion in #937 and the wiki [1].

[1]: https://github.com/sampsyo/beets/wiki/Architecture#modification-times-mtime
2014-09-14 14:19:11 +02:00
Thomas Scholtes
273874f3a2 Refactor cli main function
The logic of setting up beets and running a command was scattered
across the `_raw_main` and `_configure` functions. This is an attempt
to bring more structure to the process and to diminish the dependency
on global state.
2014-09-05 19:05:06 +02:00
Thomas Scholtes
9f4b3b811d Refactor modfiy command and tests
Parsing of the modify command line is handled by `modfiy_parse_args()`.
Test use the command line.
2014-08-25 15:46:57 +02:00
Adrian Sampson
61416da0a7 Better isolation for ConfigTest 2014-08-19 12:27:35 -07:00
Pierre Rust
9901d6a4eb Add Test case for flexattr removal (#779) 2014-05-20 23:55:42 +02:00
Thomas Scholtes
07dbe042f5 Move set_candidate logic 2014-04-25 13:23:35 +02:00
Adrian Sampson
337b1f8610 tests: use Windows config location on Windows
Only 10 test failures remain on my system!
2014-04-18 15:57:57 -07:00
Yevgeny Bezman
bbb1f7a295 tests: made all tests pass on cygwin. Fixes #655 2014-04-17 19:50:59 +03:00
Thomas Scholtes
770bee3583 Extract check for thrird party programs in tests 2014-04-15 18:23:55 +02:00
Mook
12a5215afa beet modify: Add simple argument parsing tests. 2014-04-13 21:24:45 -07:00
Adrian Sampson
77af4ce040 more test isolation (#670)
Doing test-specific cleanup in tearDown before general sandbox deletion helps
avoiding contamination of global state between tests when cleanup fails.

Current Windows status:

    Ran 1106 tests in 72.373s
    FAILED (SKIP=10, errors=13, failures=15)

Closer!
2014-04-13 13:57:22 -07:00
Adrian Sampson
7639267f8f Pythonic names for test helpers 2014-04-12 11:24:47 -07:00
Thomas Scholtes
e5104784c6 Add captureStdout helper and mocks to some tests 2014-04-12 16:49:54 +02:00
Thomas Scholtes
c01fc542ed Support for initial_key with EchoNest 2014-04-11 21:03:11 +02: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
Bruno Tournay
cd70e92b7f Modify command: ability to delete/reset an attribute (beet modify field!) 2014-04-01 22:38:33 +02:00
Thomas Scholtes
4c41a02c72 Changelog for 002d3600 2014-03-11 00:11:03 +01:00