Commit graph

37 commits

Author SHA1 Message Date
Andrew Rogl
1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
wordofglass
8833fef249 Merge pull request #2668 from wordofglass/edit_logic
Edit plugin logic: Regression from previous PR; incorrect diffs
2017-08-25 15:52:40 +02:00
wordofglass
5f21bd3ccd test_edit: Add a test for retagging. 2017-08-24 15:03:18 +02:00
wordofglass
b903b44a0c test_edit: Fix test that intended to change one item but affected two.
This didn't manifest as a testing failure since the plugin (mostly
silently) drops id changes.
2017-08-22 23:34:35 +02:00
wordofglass
c811102eb2 test_edit: Expect mtime to change, unbreaks the multiple-item tests. 2017-08-22 23:34:06 +02:00
wordofglass
18c82cab5f test_edit: Add a comment explaining why I didn't change the writing behaviour
I was midway through writing a test when realizing that it's best
the way it is...
2017-08-22 23:24:33 +02:00
Adrian Sampson
a88682e7bb Undo from _common import unittest indirection
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
2016-11-26 18:46:44 -05:00
Johnny Robeson
7a2bdf502f s/utf8/utf-8/ in all encoding/decoding contexts
This matches up with the python documentation.
2016-09-06 23:10:24 -04:00
Johnny Robeson
5b3cd44608 add coding: utf-8 magic comment to every .py file 2016-08-07 04:09:17 -04:00
Jesse Weinstein
417d78eb78 Use longer param name
Per request by jrobeson on IRC
2016-07-25 00:19:49 -07:00
Jesse Weinstein
dca27572aa Convert mock.patch.start() into annotation in test_edit 2016-07-22 23:10:35 -07:00
Adrian Sampson
e16cc58cb9 Walk back some six.iter* uses
In places where it doesn't much matter whether we use an iterator or the old
Python 2 list way, using the six name just hurts legibility.
2016-06-25 18:29:55 -07:00
Johnny Robeson
edb1cbc5fc replace iter{items|values} with six.iter{items|values} 2016-06-24 05:53:55 -04:00
Johnny Robeson
c52394c499 fix the rest of b'__main__': 2016-05-30 01:11:37 -04:00
Jack Wilsdon
b1c58e99ec Update code to match pep8 naming standards 2016-04-27 20:15:10 +01:00
Guilherme Danno
019d7cd2e6 fix some typos 2016-04-18 12:36:42 -03:00
Adrian Sampson
cb498e0772 Fix tests for #1927 fix 2016-04-03 17:50:18 -04:00
Adrian Sampson
eac7d64545 Merge branch 'master' into no_unicode_literals 2016-02-28 15:21:43 -08: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
b4d7ad1911 Removed unicode_literals from test_edit 2016-02-22 09:20:41 +01:00
Diego Moreda
7b6c2c36d3 edit: fix Plugin not unloaded during tests 2016-02-03 19:05:38 +01:00
Diego Moreda
32f9bd5077 edit: add tests for interactive importer execution
* Add EditDuringImporterTest test case, covering the running of the
plugin during an import session. Includes editing the "album" field
and applying/discarding for both editing from items and editing from
a candidate; and editing and applying for singletons for both editing
from items and editing from a candidate.
2016-02-03 17:17:48 +01: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
Adrian Sampson
635052e2ff Fix #1804: edit plugin moves files 2016-01-08 15:22:28 -08:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Adrian Sampson
f995ab38db Fix a test and a bug revealed by a test 2015-11-19 16:11:45 -08:00
Adrian Sampson
6a99eaae35 Fix a test for the new output format 2015-11-19 15:45:06 -08:00
Adrian Sampson
8e9d335a87 Tear down Item.write mock 2015-11-17 10:26:36 -08:00
Adrian Sampson
0d459752d9 Update edit plugin tests 2015-11-16 13:55:12 -08:00
Diego Moreda
e31680123b edit: update extra fields in yaml test
* Update test for extra fields in edited yaml, allowing the user to add fields
while editing. Rename the test to test_single_edit_add_field to reflect its
purpose more accurately.
2015-11-16 14:46:13 +01:00
Diego Moreda
2adf70209f edit: add test for extra fields on user yaml
* Add test_invalid_yaml_extra_field, testing the handling of user appended
fields (in particular, a non existing field) during the yaml editing.
2015-11-15 18:36:24 +01:00
Diego Moreda
5f2e5d73cc edit: update unit tests
* Update unit tests in order to reflect the changes on the last refactor of
edit.py (patch edit.edit instead of EditPlugin.get_editor, revise stdin strings
to match current version, remove TODO on docstrings from malformed and invalid
yaml tests).
2015-11-15 18:09:20 +01:00
Diego Moreda
d9ebb3409a edit: add album query tests, revise failing ones
* Add tests for executing the command with album queries (-a), testing the edit
of album and albumartist fields.
* Revise invalid and malformed yaml tests so they return a failure instead of
an error.
2015-11-11 15:50:32 +01:00
Diego Moreda
6e6aa9700d edit: more assertions on existing tests, new tests
* Modify existing tests in order to explicitely check for differences (or lack
of) in the items fields, with the intention to ensure that no unintended changes
slip through.
* Added tests for modifying a single item from a list of items, and for editing
the album field of the items (stub for discussing whether the actual album
should be updated, etc).
2015-11-10 19:16:04 +01:00
Diego Moreda
41b4987990 edit: add initial black-box tests
* Add tests for the edit plugin, including a helper for bypassing the manual
yaml editing. Tests are focused on "black-box" functionality, running the
command and making assertions on the changes made to the library.
2015-11-09 21:51:14 +01:00