Commit graph

7983 commits

Author SHA1 Message Date
Adrian Sampson
58afaf07a5 Switch to new noqa syntax for flake8 3.0
Apparently, `# noqa ignore=X` worked before, but now the syntax is more terse,
like this: `# noqa: X`.

See the changelog here:
http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
2016-07-25 15:02:10 -04:00
Adrian Sampson
6a71e4bad4 tox: Add a py35-flake8 environment
This is not on by default, but it's still useful to have around.
2016-07-25 14:58:49 -04:00
Adrian Sampson
6772b4d1fd Leave captured stdout as Unicode on Python 3 2016-07-25 13:24:51 -04:00
Adrian Sampson
0e2b8a5b60 Use native strings for IO in a test 2016-07-25 13:22:57 -04:00
Adrian Sampson
b73bbf0b3e In completion tests, don't load system scripts
On my machine, the "leak" of other bash_completion scripts here recently
started doing a *lot* of work for other packages. Most damningly, it started
compiling a bunch of stuff with rustc! Now we only load beets' own completion
stuff.
2016-07-25 12:57:44 -04:00
Adrian Sampson
e65e7a6716 Fix minor style in completion test 2016-07-25 12:45:32 -04:00
Johnny Robeson
1b103b087b reencode convert args on py3 for util.command_output
command_output requires bytestrings, so we put em back that way.
2016-07-25 04:57:02 -04:00
Johnny Robeson
e5497c7494 use stringed template vars on PY3 in convert plugin
We decode them with `surrogateescape`, so we avoid decoding errors
2016-07-25 03:28:02 -04:00
Jesse Weinstein
417d78eb78 Use longer param name
Per request by jrobeson on IRC
2016-07-25 00:19:49 -07:00
Johnny Robeson
f8049e67b4 add test helper method to convert cmd args on py2/3
This helper method converts args to bytes on python 2, and args to
strings on python 3
2016-07-25 02:59:41 -04:00
Jesse Weinstein
9df4b6dc15 do_test is not actually a test 2016-07-24 22:45:31 -07:00
Johnny Robeson
ba26b7d26f replace calls to _raw_main in test_ui with run_command 2016-07-25 01:04:06 -04:00
Johnny Robeson
9ab9166c8d add a lib keyword arg to the run_command test helper
Now a `Library` instance can be passed to run_command as a keyword
argument.
2016-07-25 00:43:33 -04:00
Johnny Robeson
7bb649c3b2 remove :memory: library fallback from test run_command 2016-07-25 00:16:09 -04:00
Johnny Robeson
2b349c7851 use :memory: Library in all test_config_command tests 2016-07-25 00:14:53 -04:00
Johnny Robeson
3275a511c2 remove a template test that doesn't test anything
@samspyo discovered that this test wasn't testing anything of value, so
we're dropping it.
2016-07-24 23:40:29 -04:00
Adrian Sampson
039825e0e0 Only use CodingFormatter on Python 2 2016-07-24 15:01:06 -07:00
Adrian Sampson
c67fbefc4c A little more spcificity in CodingFormatter 2016-07-24 14:59:31 -07:00
Jesse Weinstein
92d008b155 Fix overlength lines 2016-07-24 12:11:35 -07:00
Adrian Sampson
d9a55dac4c Trim the docs on dependency installation (#2139) 2016-07-23 12:25:13 -07:00
Adrian Sampson
f96bdcb563 Merge pull request #2139 from davidak/plugin-dependencies
docs: add instructions to install plugin dependencies, fixes #2136
2016-07-23 12:23:08 -07:00
davidak
3d351548cf docs: add instructions to install plugin dependencies, fixes #2136 2016-07-23 13:31:33 +02:00
Johnny Robeson
20321feda7 read and write pipes as bytes in completion tests
The stdin/stdout for subprocess are bytes, so treat them that way
2016-07-23 04:34:07 -04:00
Johnny Robeson
0377a4e26b open completion files in test_ui in binary mode 2016-07-23 04:24:15 -04:00
Jesse Weinstein
d808316b23 Switch over 3 more files 2016-07-22 23:51:06 -07:00
Jesse Weinstein
e5a723b899 Switch test_importer over to use @patch 2016-07-22 23:35:33 -07:00
Jesse Weinstein
dca27572aa Convert mock.patch.start() into annotation in test_edit 2016-07-22 23:10:35 -07:00
Adrian Sampson
6f0cb6cb8c Merge pull request #2137 from beetbox/fix_bad_patching
Fix patcher to always be correctly cleaned up
2016-07-22 08:50:53 -04:00
Jesse Weinstein
8474ae3f66 Fix patcher to always be correctly cleaned up 2016-07-21 23:55:07 -07:00
Johnny Robeson
e1d1d7b026 remove eval-attr for slow tests in setup.cfg
The code that relied on this in the tests was removed in 84c82cc44b

I don't think this was a good global option anyways, so I don't see us
returning to it.

This was discovered by @JesseWeinstein
2016-07-21 01:58:08 -04:00
Adrian Sampson
efe6542695 Docs rewording for #2117 (fix #2045) 2016-07-20 23:46:36 -04:00
Adrian Sampson
d0c2bb1d76 Merge pull request #2117 from mousey/master
Emby API Key
2016-07-20 23:42:09 -04:00
Johnny Robeson
f87486c1fa pass bytestringed names to fnmatch_all()
Due to `syspath`, fnmatch ends up comparing strings to bytes, so we must
make sure they are bytes. Fixes #2124
2016-07-20 23:35:22 -04:00
Rob McGhee
af24277ad3 Emby API Key Update
Added note to the Emby Plugin Documentation
2016-07-20 21:17:45 +01:00
Rob McGhee
84b8cf0ab5 Merge remote-tracking branch 'refs/remotes/beetbox/master' 2016-07-20 21:13:32 +01:00
Johnny Robeson
e7428972ca Merge pull request #2130 from JDLH/pydev-eclipse-support
Ignore PyDev and Eclipse project settings.
2016-07-18 03:04:27 -04:00
Jim DeLaHunt
2885a189f8 Ignore PyDev and Eclipse project settings. 2016-07-17 23:42:29 -07:00
Johnny Robeson
1da919bc40 open lastgenre genres file with codecs.open()
This should fix an error when decoding the file on Windows. It defaults
to using the code page there and not utf-8 as intended for yaml.
2016-07-17 06:57:38 -04:00
Johnny Robeson
1ee7a3e2f1 Merge pull request #2127 from jrobeson/require-py34-flake8
replace py27-flake8 with py34-flake8
2016-07-16 22:23:23 -04:00
Johnny Robeson
9aeaff0e9a replace py27-flake8 with py34-flake8
We definitely want py34-flake8 to succeed, so we don't end up with
`unicode` and other py27 specific. With that in mind, we don't need
py27-flake8 anymore either.
2016-07-16 22:16:04 -04:00
Johnny Robeson
21dbc9cbab use windows specific language for symlink exceptions
This now shows our original OS symlink error when Windows version < 6 (Vista) and also shows any other OS error that might be raised.

This fixes #2114
2016-07-16 01:49:11 -04:00
Johnny Robeson
65e38896ad except on NotImplementedError in util.link
NotImplementedError is raised on python >= 3.2 and Windows versions before Vista.  This is one part of the fix for #2114
2016-07-16 00:22:01 -04:00
Johnny Robeson
22c6d85535 remove tb.format_exc() from util.link replace 2016-07-15 17:40:48 -04:00
Johnny Robeson
80bb550f45 remove useless format_exc in util.move
There isn't a traceback for us to format here, so it errors out on
certain versions of python 3
2016-07-15 03:06:14 -04:00
Johnny Robeson
18b57ea022 clear argv before running commands in the test suite
Fixes #2123
2016-07-14 03:33:29 -04:00
Johnny Robeson
41fb0d9287 Explicitly sort match candidates by distance
Python 3 is stricter when sorted values compare equally, so we explictly
sort by distance. This fixes #2125
2016-07-14 03:23:39 -04:00
Johnny Robeson
7e150481b6 compare test_types plugin test output as strings
Since we're using StringIO (and equivalent in DummyIO), we can just use
strings here.
2016-07-11 02:25:22 -04:00
Johnny Robeson
910a1b93f5 don't test symlink related functions on Windows
They do work, but only with admin privs.  Related discussion in #2114
2016-07-10 20:26:21 -04:00
Johnny Robeson
a1edf1928d treat bpd command and args as strings, not bytes 2016-07-10 19:21:52 -04:00
Johnny Robeson
f82f5f51a4 use !r for command exec logging in play plugin
This is a bit simpler and is compatible with py2 and 3.
2016-07-10 06:00:53 -04:00