Thomas Scholtes
6286bc0b0f
Include site-packages on travis and skip tests otherwise
2014-04-04 22:43:08 +02:00
Thomas Scholtes
5b277eedf8
Add replaygain test for command backend
2014-04-04 22:42:17 +02:00
Yevgeny Bezman
b47e6dd4d4
replaygain: added a test for skipping already calculated items
2014-04-04 22:01:59 +03:00
Thomas Scholtes
5d666fa4e7
Reset config and plugins after tests
2014-04-04 19:52:39 +02:00
Thomas Scholtes
81f53fb0d2
Add basic cli tests for replaygain
2014-04-04 19:44:16 +02:00
Thomas Scholtes
4970c1de5a
Add tests for item.write() custom path
2014-04-04 15:19:32 +02:00
Thomas Scholtes
e62d36aa69
Remove lazy update from MediaFile
2014-04-04 13:40:10 +02:00
Thomas Scholtes
eb4c323bcb
Plugins can now extend MediaField
2014-04-04 00:48:29 +02:00
Thomas Scholtes
3c7dd13b72
Add Item.media_fields
...
This new property controls which fields to read from a media file.
2014-04-03 23:35:33 +02:00
Adrian Sampson
ac99622ec7
Merge branch 'single-files'
...
Conflicts:
docs/changelog.rst
2014-04-03 13:20:53 -07:00
Adrian Sampson
7f9e301428
fix tests for cached weights loading
2014-04-03 13:17:38 -07:00
Thomas Scholtes
2011156f8b
Add test case for single file import
2014-04-03 22:13:31 +02:00
Kyle Konrad
7f3092ce5a
four space indentation and assertGreater for __gt__ coverage
2014-04-03 12:04:51 -07:00
Thomas Scholtes
c4f0928bf5
Read custom fields into database
2014-04-03 14:01:56 +02:00
Thomas Scholtes
b262edd972
Migrate ITEM_KEYS_META
2014-04-03 14:01:56 +02:00
Thomas Scholtes
43ae730a6a
Use readable_fields() to replace ITEM_KEYS_META
2014-04-03 14:01:56 +02:00
Thomas Scholtes
863b9fb4af
MediaFile can be extended with custom fields
2014-04-03 14:01:55 +02:00
Thomas Scholtes
a2a8b244d7
Add LazySave tests for MediaFile
2014-04-03 14:01:55 +02:00
Thomas Scholtes
bedad53c27
Test that we can migrate ITEM_KEYS_WRITABLE
...
The test show that we can replace the hard-coded `ITEM_KEYS_WRITABLE` constant
with the computed value derived from `MediaField.fields()` and ITEM_KEYS. This
will be done in the next commit.
2014-04-03 14:01:55 +02:00
Thomas Scholtes
bcb72becf8
Add MediaFile.update() method to supersede save()
2014-04-03 14:01:55 +02:00
Thomas Scholtes
b026d60c31
Add MediaFile.fields() method
2014-04-03 14:01:55 +02:00
Kyle Konrad
142374925f
add util test file with tests for enumerations. fix super() bug
2014-04-02 15:31:28 -07:00
Thomas Scholtes
100b3d4d65
Make mediafile tests independent of image order
...
For MP3s mutagen stores image tags in a hash with the `APIC:...` key. The order
of the images is therefore not well defined. A similar issue occurs with WMAs.
2014-04-02 22:15:00 +02:00
Bruno Tournay
cd70e92b7f
Modify command: ability to delete/reset an attribute (beet modify field!)
2014-04-01 22:38:33 +02:00
Filipe Fortes
ea90321226
Update tests given new alias behavior
2014-03-26 13:01:42 -07:00
geigerzaehler
3ac2c7a1d7
Merge pull request #603 from geigerzaehler/write-exception-handling
...
Exception handling for item writes
2014-03-24 17:55:48 +01:00
Thomas Scholtes
574903e986
Add FileOperationError and handling in item.write()
2014-03-24 14:22:27 +01:00
Thomas Scholtes
d21406dcb0
Use nose to capture logs during test
...
Set the loglevel of beets to `DEBUG` but capture all logging statements with
nose. The logs are only printed when a test fails. This gives us more
information when tests fail while being completely silent on success.
2014-03-23 21:12:08 +01:00
Adrian Sampson
ddddbbb919
some more thorough documentation for #614
2014-03-21 17:51:50 -07:00
Adrian Sampson
3b403937d6
Merge pull request #614 from asutherland/survive-bad-dates
...
Return 0 dates instead of throwing on bad dates.
2014-03-21 17:43:30 -07:00
Thomas Scholtes
b131922b90
Add failing importfeed tests for albums with slashes
...
Isolates bug in #610
2014-03-19 17:26:11 +01:00
Andrew Sutherland
e290f8dfad
Use _safe_cast to avoid dying on illegal dates.
2014-03-18 01:38:04 -04:00
Adrian Sampson
03fa8d809b
tests: properly install & restore some fixtures
...
Brought up while investigating #612 .
2014-03-15 12:30:06 -07:00
Agatha
7f19194403
Updated test_importer for Various Artists
...
All py.test tests should pass now
2014-03-15 14:23:27 -04:00
Thomas Scholtes
41045ec33d
Remove tests for editing list of tags by reference
...
See discussion in #605
Commit 3000: Wooho
2014-03-12 13:35:49 +01:00
Thomas Scholtes
4c41a02c72
Changelog for 002d3600
2014-03-11 00:11:03 +01:00
Thomas Scholtes
0012ba5bd9
Prevent tests from cluttering the working directory
2014-03-11 00:03:20 +01:00
Adrian Sampson
7ddb8676c4
Merge pull request #597 from johtso/fetchart-requests-plus-useragent
...
Switch fetchart to requests and send user-agent
2014-03-09 11:43:51 -07:00
Thomas Scholtes
4abc849a51
Genre list support for WMA
2014-03-09 14:27:49 +01:00
Thomas Scholtes
610e4f14eb
Merge branch 'image-tags'
...
Conflicts:
beets/mediafile.py
2014-03-09 14:13:12 +01:00
Thomas Scholtes
0335059293
Add tiff image fixture
2014-03-09 14:09:31 +01:00
Thomas Scholtes
9fe212feea
Add support for different coverart mime types
2014-03-09 13:09:26 +01:00
Thomas Scholtes
28bab0a9a3
Test invalid image format for MP4
2014-03-09 13:01:14 +01:00
Thomas Scholtes
d2b627cc1c
Make sure the png_data method is available
2014-03-09 12:50:24 +01:00
Thomas Scholtes
57d7a51b5c
Rename TagImage to Image
2014-03-09 12:47:38 +01:00
Thomas Scholtes
c435fd7446
Implement ImageListField for MP4
2014-03-09 12:46:51 +01:00
Johannes
3367dad0a4
Make fetchart use requests and send useragent
...
Closes #585
2014-03-09 09:26:30 +00:00
Thomas Scholtes
63def728dc
Implement ImageListField for WMA
2014-03-09 01:48:56 +01:00
Thomas Scholtes
806d3cc6e9
Implement ImageListField for Vorbis comments
2014-03-09 00:56:44 +01:00
Thomas Scholtes
a99dea1d9b
Add tests for legacy coverart tag in ogg
...
Added a `coverart.ogg` fixture file that contains raw image data encoded as
base64 in the COVERART tag. We test that the `art` property on mediafiles
correctly reads these tags and transforms them into METADATA_BLOCK_PICTURE tags
on write.
2014-03-09 00:38:05 +01:00
Thomas Scholtes
a11bae9386
Implement ImageListField for FLAC
2014-03-09 00:11:46 +01:00
Thomas Scholtes
4e6643a41b
Remove picture from full flac fixture
2014-03-09 00:08:30 +01:00
Thomas Scholtes
ae18ea52cf
Add flac fixture with images
2014-03-09 00:07:29 +01:00
Thomas Scholtes
c5c87ac46c
Implement extended image lists for mediafiles.
...
Makes the test of 80eded77b1 work.
2014-03-08 17:27:01 +01:00
Thomas Scholtes
a9257ae57b
Add image mediafile fixture
2014-03-08 17:03:43 +01:00
Thomas Scholtes
c9fc36b02e
Fix mediafile image tests
2014-03-08 17:03:16 +01:00
Thomas Scholtes
80eded77b1
Add API tests for images in tags
2014-03-08 16:12:24 +01:00
Adrian Sampson
fc8325753c
skip completion test if script not found
2014-03-07 14:46:09 -08:00
Thomas Scholtes
0832b9b346
Move mediafile cast logic to storage style
...
StorageStyle.get should return a python builtin type.
This amends 5716cd1024
2014-03-07 16:32:21 +01:00
geigerzaehler
c654df9422
Merge pull request #564 from geigerzaehler/mediafile-date
...
Remove date packing and invert date dependency
2014-03-07 12:11:21 +01:00
geigerzaehler
69cb44003e
Merge pull request #579 from johtso/fix-safe-case-asfunicodeattribute
...
Fix _safe_cast of ASFUnicodeAttribute
2014-03-06 11:20:16 +01:00
Thomas Scholtes
a47f3f0a2e
Add suite function to config command test module
...
This makes `python setup.py test` work again and fixes #576
2014-03-06 11:13:24 +01:00
Johannes
5716cd1024
Fix _safe_cast of ASFUnicodeAttribute
...
Fixes #578
2014-03-06 00:21:33 +00:00
Thomas Scholtes
165c28e967
Raise configuration error if BEETSDIR is file
2014-03-04 17:29:14 +01:00
Thomas Scholtes
e916609eee
Save import history only when path associated
...
Fixes #570
2014-03-04 17:12:42 +01:00
Thomas Scholtes
f33c0bceff
Remove date packing and invert date dependency
...
Before, each year, month, and day field used packing to store its values in the
same tag but at different positions. We then instantiated a
`CompositeDateField` to combine the different values. This lead to code
duplication in the storage styles for these fields. It also inverted the data
dependency. It's more natural to think of year, month, and day as part of a
date then as of a date as composed of these.
Now, only `DateField` class stores data in the files tag. This makes sense: One
tag, one field that accesses it. To obtain access to the year, month, and day
parts, the DateField is equipped with factories that create `DateItemField`
instances associated to a `DateField`. These descriptor allow us to get and set
parts of a date field.
2014-03-03 00:02:42 +01:00
Thomas Scholtes
8a5a2fcebf
Merge branch 'completion'
...
Conflicts:
beets/ui/commands.py
docs/reference/cli.rst
2014-03-02 23:06:05 +01:00
Thomas Scholtes
44c843793b
Add completion of plugin commands
2014-03-02 16:18:16 +01:00
Thomas Scholtes
c345df9155
Merge branch 'config_command'
...
Conflicts:
beets/ui/commands.py
docs/reference/config.rst
test/_common.py
2014-02-28 16:50:06 +01:00
Thomas Scholtes
4ca3c8764e
Test mediafile with unicode strings
2014-02-28 14:04:41 +01:00
Adrian Sampson
5ccd9674a6
Merge branch 'mediafile_multiple_values' of https://github.com/geigerzaehler/beets into geigerzaehler-mediafile_multiple_values
...
Conflicts:
beets/mediafile.py
2014-02-27 19:12:53 -08:00
Thomas Scholtes
2b0929b71b
Complete queries
2014-02-27 22:13:09 +01:00
Thomas Scholtes
8450d51bab
bash-completion package can be set by environment
2014-02-27 17:57:02 +01:00
Thomas Scholtes
996a1d6c90
Use bash-completion package
2014-02-27 17:52:23 +01:00
Thomas Scholtes
211d3ac1cb
Do not evaluate in subshell
2014-02-27 15:28:16 +01:00
Thomas Scholtes
81a28198aa
Test completion with clean bash instance
2014-02-27 15:09:02 +01:00
Thomas Scholtes
c73ada92c8
Ensure we go back to default path implementation
...
If an error is raised within the mock path context and catched upstream the
rest of the tests will run with the mocked path and fail horribly.
2014-02-23 16:38:41 +01:00
Adrian Sampson
1253cb695d
move show_model_changes to ui package
...
This makes it more naturally reusable for plugins.
2014-02-22 15:06:16 -08:00
Adrian Sampson
b383ce3450
comment out some skipped tests
...
The *only reason* I'm doing this is so that the unittest output looks
prettier. I am pretty sure I have actual OCD. 😳
2014-02-22 14:59:22 -08:00
Adrian Sampson
645279e022
remove old _showdiff
...
Totally replaced now, including tests! Woohoo.
2014-02-22 14:52:33 -08:00
Thomas Scholtes
e8e0682aae
Add completion support for bash 3.2
...
Bash 3.2 does not have associative arrays, so we hack around that by using
generic varibale names like `opts__$cmd`. We also don't support the "?" alias
anymore.
2014-02-22 17:59:23 +01:00
Adrian Sampson
0ead6ee8cc
don't relativize command-line paths ( #513 )
...
Paths given on the command line (e.g., with the --library option) need to be
relative to the working directory, not the config file.
2014-02-21 21:04:03 -05:00
Adrian Sampson
129575178c
docstring/style fixups for #513
2014-02-21 20:52:21 -05:00
Thomas Scholtes
14ece207c9
Add completion command
...
The command prints a shell script that provides completion for the `beet`
command. To test it run `eval "$(beet completion)"` in your shell.
I also included some crude testing for this. The `test/test_completion.sh`
script runs tests in a shell and exit with a non-zero status code if the tests
fail. It assumes that the completion script is already loaded in the executing
shell.
As of now the completion only works for bash 4.1 and newer.
2014-02-20 01:15:03 +01:00
Thomas Scholtes
c8e32f6bef
Add config command
2014-02-18 20:56:08 +01:00
Thomas Scholtes
f1f6adcb0d
Implement new configuration behaviour
2014-02-18 16:48:35 +01:00
Thomas Scholtes
d900b594be
Specify configuration behaviour with tests
...
Beets stores all its data in the `BEETSDIR` directory. The default is
determined by the system:
* `%APPDATA%\beets` on Windows. If the `APPDATA` environment variable is
not set it falls back to `~\AppData\Roaming\beets`.
* `$XDG_CONFIG_DIR/beets` on UNIX. If the `XDG_CONFIG_DIR` environment
variable is not set it falls back to `~/.config/beets`
* `~/Library/Application Support/beets` on OSX
The default can be overwritten using the `BEETSDIR` environment variable.
The user configuration is read from `$BEETSDIR/config.yaml`. Additional
configuration files that overwrite options from the user configuration may
be specified using the `--config` command line options.
All relative paths in any configuration are resolved relative to `BEETSDIR`.
2014-02-18 16:48:35 +01:00
Adrian Sampson
c196f20dfc
fix numeric queries over empty string ( fix #547 )
2014-02-17 22:51:53 -05:00
Adrian Sampson
a8ee13f16e
add some failing tests for date queries
2014-02-14 23:02:51 -08:00
Adrian Sampson
be31ac683a
Model._parse() class method
2014-02-13 21:29:17 -08:00
Adrian Sampson
4bb2622b9b
fix testability of main entry point
2014-02-13 13:56:26 -08:00
Adrian Sampson
23fb5da1dc
Revert "Replace path separators from config"
...
This reverts commit c82b31e750 .
Conflicts:
docs/changelog.rst
2014-02-13 13:22:45 -08:00
Thomas Scholtes
a825f8465f
Remove feature for separate review
2014-02-13 15:31:08 +01:00
Thomas Scholtes
9f59592a88
Basic test cases should come first
2014-02-13 14:24:49 +01:00
Thomas Scholtes
45921cac9e
StorageStyle specifies which format it can handle
2014-02-13 14:15:36 +01:00
Thomas Scholtes
1f01997141
Only write mediafiles when tags have changed
2014-02-11 15:20:44 +01:00
Thomas Scholtes
52c0e93f07
JPG image data returns correctly
2014-02-11 14:54:33 +01:00
Thomas Scholtes
49bce6276e
Fix test run with setuptools
2014-02-11 13:24:47 +01:00
Thomas Scholtes
dcbf7ecc36
Fix album retrieval
2014-02-10 17:26:26 +01:00
Thomas Scholtes
a363d9672f
Load plugins from cli config
2014-02-10 17:26:26 +01:00