Commit graph

197 commits

Author SHA1 Message Date
Johnny Robeson
bb15829b17 add missing b' to config.yaml files in ui tests
I'd not gotten around to doing this because of other py3 test
issues, but here we go now!
2016-07-07 03:44:19 -04:00
Johnny Robeson
35d0e81949 add missing bytestring_paths for python -bb 2016-07-03 22:25:47 -04:00
Johnny Robeson
9020dc1f45 use text_string() in a few places for io output 2016-07-02 00:03:46 -04:00
Johnny Robeson
aa0a0a0f22 use util.py3_path for confit and env paths in tests 2016-06-30 22:24:17 -04:00
Johnny Robeson
dd729f0ce8 mark more paths as bytestrings in tests 2016-06-30 22:21:56 -04:00
Adrian Sampson
c532860613 Apply simple type consistency changes from #2096
These are the changes from that PR that just enforce the path type invariants
we already want---they're a good idea regardless of Python 3.
2016-06-30 14:22:16 -07:00
Adrian Sampson
d5205915cc Avoid dangerous string conversions (#2094)
This rolls back the places in #2094 where `six.text_type(s)` was used where
`s` might be a bytestring. We almost never want that conversion, because it
uses the default encoding (almost always ASCII). The need for it indicates a
problem somewhere else, where bytes were produced when we were expecting
unicode strings.
2016-06-29 10:30:26 -07:00
Adrian Sampson
5efd5b21c5 Use new as_str method
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Johnny Robeson
e8afcbe7ec replace unicode with six.text_type 2016-06-24 05:53:49 -04:00
Adrian Sampson
133c82b1ab Fix #2063: properly decode format CLI argument 2016-06-21 15:15:24 -07:00
Adrian Sampson
351b6f8c9d Remove raw Unicode literals (fix #2069)
PEP 414 didn't add `ur"..."` literals to Python 3. So for hybrid 2/3
compatibility, these had to be replaced with ordinary Unicode string literals.
This was only painful for one string; the others were only raw strings by
convention. (All were regexes.)
2016-06-21 14:29:14 -07:00
Johnny Robeson
ffa46a185c bytestring normalization
Make sure many/most strings that touch the filesystem are
converted explicitly to bytestrings rather than implictly.
2016-06-13 05:39:09 -04:00
Johnny Robeson
f8bdf7498f use _common.PLUGINPATH in one more place
Not sure how I missed it, but I did
2016-06-11 03:33:50 -04:00
Johnny Robeson
e97d93b8f5 introduce a PLUGINPATH attr to _common test
I consider this a test global option. It should help split up the
ui tests a bit
2016-06-11 03:00:43 -04:00
Jack Wilsdon
26a17a3703 Remove trailing whitespace added in a45dcdc 2016-06-09 19:23:54 +01:00
Adrian Sampson
a45dcdc674 Fix Windows env vars for config test 2016-06-09 09:58:10 -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
93e614c739 Tests for _{in,out}_encoding (#2041) 2016-06-08 09:47:45 -07:00
Adrian Sampson
a5b7489dd1 Use new assertion in config tests 2016-06-06 11:40:04 -07:00
Adrian Sampson
71b9fd785c Revert "Do __name__ comparison with bytes and not unicode"
This reverts commit 9c41c39913.
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Jack Wilsdon
b1c58e99ec Update code to match pep8 naming standards 2016-04-27 20:15:10 +01: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
Adrian Sampson
c16201a795 Keep raw literals for regular expressions 2016-02-28 14:10:11 -08:00
Markus Unterwaditzer
a07b98ad24 Fix leftover literals 2016-02-28 19:21:59 +01:00
Peter Kessen
b6e0696041 Removed unicode_literals from test_ui
* nosetests ´test.test_ui´ fails for two tests
2016-02-28 13:47:22 +01:00
Peter Kessen
c28eaee7d0 implemented interactive selection in modify 2016-01-28 21:50:37 +01:00
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