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
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
27c6c3d6da
Removed unicode_literals from test_replaygain
2016-02-25 07:38:38 +01:00
Diego Moreda
76d7c65c1b
replaygain: refine test by subclassing exception
...
* Subclass FatalReplayGainError into FatalGstreamerPluginReplayGainError
in order to handle gstreamer plugin errors more cleanly on
test_replaygain.
2016-01-26 22:20:42 +01:00
Diego Moreda
d2cec48c65
Skip GStreamer tests if plugins are missing
...
* Add a check to ReplayGainGstCliTest that ensures that the required
initial gstreamer plugins can be loaded, skipping the test if it is not
the case instead of running it.
* Add a check to ReplayGainGstCliTest.test_cli_saves_track_gain for
checking if item.rg_track_peak and item.rg_track_gain is not None. If
they are None, it is assumed that the decoder plugins could not be
found, and the tests is skipped, as discussed on #1830 .
2016-01-26 17:59:51 +01:00
Adrian Sampson
5f8e710e07
Fix configuration in ReplayGain tests ( #1830 )
2016-01-25 10:27:36 -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
jean-marie winters
efb7370e04
Merge branch 'master' of https://github.com/sampsyo/beets into bs1770gainsupport
2015-03-06 22:02:48 +01:00
Bruno Cauet
5a355201d3
test_replaygain: fix except a, b: → except (a, b):
2015-03-04 15:29:19 +01:00
Bruno Cauet
f8e2ca2c94
Replaygain tests: more careful plugins unloading
...
When plugins loading as failed plugins unloading may fail in
consequence, swallowing the loading error. This fixes it.
2015-03-04 15:05:22 +01:00
jean-marie winters
5d9bb5059a
corrected typo
2015-03-04 07:20:53 +01:00
jean-marie winters
614f8eda88
added tests for bs1770gain
2015-03-03 23:02:02 +01:00
Bruno Cauet
53c21330c2
All tests use unicode_literals
2015-01-20 15:58:02 +01:00
Bruno Cauet
9c41c39913
Do __name__ comparison with bytes and not unicode
2015-01-20 12:03:57 +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
98ae8cbbc9
Make tests conform to PEP8
2014-09-09 22:31:46 +02:00
Thomas Scholtes
ea04344560
Test and fix unicode issues in logs. Fixes #699
...
The helper functions for creating test fixtures now include unicode characters.
2014-04-17 12:12:49 +02:00
Thomas Scholtes
770bee3583
Extract check for thrird party programs in tests
2014-04-15 18:23:55 +02:00
Adrian Sampson
2f3ed3e450
avoid extra output in test mp3gain run
2014-04-13 20:41:58 -07:00
Adrian Sampson
5477a5d039
better tolerance in RG tests
...
The first fix avoids contaminating all future tests if the plugin fails to
load. The second skips the CLI backend tests when the appropriate tool is not
available (just as we do with the GStreamer tests).
2014-04-12 19:04:01 -07:00
Thomas Scholtes
65fcb8a28c
Allow CLI tests to use :memory: db
...
This significantly increases performance
2014-04-12 16:08:57 +02:00
Thomas Scholtes
6705c123cf
Use helper for replaygain tests
2014-04-11 15:14:13 +02:00
Thomas Scholtes
7b954d9999
Remove null normalization for replaygain.
...
A `None` value for replagain fields is different from a `0.0` value [1].
[1]: https://github.com/sampsyo/beets/issues/157#issuecomment-39521322
2014-04-10 22:02:24 +02:00
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