Right now tests are only run against Python 3.5, but we claim we support
Python 3.5+ so let’s run our tests against both Python 3.5 and all later
(stable) versions.
PR: https://github.com/whipper-team/whipper/pull/433
Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
* Enable whipper to use track title if possible
track.title = t.get('title', t['recording']['title']).
Since if a track itself doesn't have a title then the track
title is the same with the recording title. Otherwise, a track
has its own title then t['title'] is different from
t['recording']['title'] and whipper chooses t['title'].
[Fixes#192]
Signed-off-by: ABCbum <kimlong221002@gmail.com>
* Add test case to check for track title
Using an existing JSON release file
Signed-off-by: ABCbum <kimlong221002@gmail.com>
Every line, except the last one, of the output was missing a double quote character at the end.
Additional changes:
- Specify parser to avoid BeautifulSoup warning
- Use single quotes only
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Python 3 port
From now on whipper's codebase will be compatible only with Python 3.
NOTE: This pull request introduces a regression: more details in #424.
Special thanks to @ddevault for kickstarting the porting effort!
More details about the fix to the testDuration failure (regression):
```
FAIL: testDuration (whipper.test.test_image_toc.CapitalMergeTestCase)
testDuration
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/twisted/internet/defer.py", line 151, in maybeDeferred
result = f(*args, **kw)
File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/twisted/internet/utils.py", line 221, in runWithWarningsSuppressed
reraise(exc_info[1], exc_info[2])
File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/twisted/python/compat.py", line 464, in reraise
raise exception.with_traceback(traceback)
File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/twisted/internet/utils.py", line 217, in runWithWarningsSuppressed
result = f(*a, **kw)
File "/home/travis/build/whipper-team/whipper/whipper/test/test_image_toc.py", line 271, in testDuration
self.assertEqual(self.table.getFrameLength(), 173530)
File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/twisted/trial/_synctest.py", line 432, in assertEqual
super(_Assertions, self).assertEqual(first, second, msg)
File "/opt/python/3.5.6/lib/python3.5/unittest/case.py", line 829, in assertEqual
assertion_func(first, second, msg=msg)
File "/opt/python/3.5.6/lib/python3.5/unittest/case.py", line 822, in _baseAssertEqual
raise self.failureException(msg)
twisted.trial.unittest.FailTest: 184930 != 173530
```
The test fails because if either nextTrack.session or thisTrack.session are None the if is false and the instructions inside it aren't executed. The check for None is needed because Python 3 doesn't allow NoneType comparisons (in Python 2 that was possible).
IIRC correctly in that test nextTrack.session has value 2 while thisTrack.session is None. That means the Python 2 version evaluates the if condition to true, while the Python 3 version in the first commit does not.
With this change both of the values of nextTrack.session and thisTrack.session are compared as int (if None, the value 1 is used for the comparison - as in disc session 1).
Regression introduced in 64dd9d843a.
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
- Removed unused code not portable due to buffer() use
- raw_input() does not exist in Python 3
- Fixed octal constant syntax for Python 3
- Fixed TypeError
- Replace if not exists: makedirs(path) with single call: using makedirs(path, exist_ok=True)
- Class inherits from object, can be safely removed from bases in python3: pylint's useless-object-inheritance (W0235) check
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
(To make versioning work properly for the develop branch, since
currently the v0.8.0 tag only exists in the master branch. This merge
will pull the v0.8.0 tagged commit into the develop branch too.)
- insert newlines after blocks of content
- strip quotes around creation time and offset
- Change offset value representation
- Clarify logger regular expressions
- Fix missing AccurateRip Summary field
- Read usage of time.gmtime(epoch) for generating datetime string
- fix missing dependency in travis
- install pycdio with specific version separately
Signed-off-by: itismadness <itismadness@users.noreply.github.com>
The attributes working_directory, disc_template, output_directory and offset are not defined during whipper cd info and they are only needed for ripping. self.program.getTable doesn't need output_path to gather the tocfile.
Therefore, this part is excluded, if the attributes don't exist and an offset of 0 is used.
Fixes issue #375.
Co-authored-by: gorgobacka <tho.b.j@gmx.de>
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Signed-off-by: gorgobacka <tho.b.j@gmx.de>
This allows log parsers to always extract correct information about the "artist" and "title" fields: previously that was a problem if either (or both) of those fields contained a "-" character.
Fixes#416.
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Output lines of cdrdao for single digit track numbers start with a
whitespace character.
Broken since #345 was merged.
Signed-off-by: Andreas Oberritter <obi@saftware.de>
If the eject command exits with an error, the output is logged as a WARNING. I don't think it's a good idea to mask those errors.
Closes#354.
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>