Skip to content

Add python nosetests #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Oct 23, 2014
Merged

Conversation

cchampet
Copy link
Member

@cchampet cchampet commented Oct 7, 2014

  • 16 tests.
  • Travis: launch tests after build.
  • Update python module and avtranscoder python library.
  • fix Add nosetests #76

Clement Champetier added 17 commits September 1, 2014 11:55
* Contains 2 nose-tests:
     * testAddMetadataDate: add metadata 'date' to the outputFile.
     * testAddMetadataPlo: check if metadata 'plop' is not added to the
outputFile.
* Add 6 nose-tests about dummy.
* Add 2 nose-tests about rewrap.
* Add 6 nose-tests about transcode.
* Modules are in lower cases (python...).
* Install python module in site-packages/pyAvTranscoder directory.
* Update import of avtranscoder module for pyTests.
For Python binding, need to compile the wrapper into a lib called
_<module_name>.so
ProgressListener to NoDisplayProgress.
* Create a tuple which can be use after in the assert.
* Rename testAddMetadataPlop to testAddImpossibleMetadata (update
comment).
ProgressListener to NoDisplayProgress.
ProgressListener to NoDisplayProgress.
ProgressListener to NoDisplayProgress.
Two variables are used in tests:
     * AVTRANSCODER_TEST_AUDIO_FILE
     * AVTRANSCODER_TEST_VIDEO_FILE
* Temporary solution, to launch tests with Travis.
Comment this test because of a crash (due to pixel format YUV420).
Remove spaces and semicolons.
@cchampet cchampet force-pushed the dev_pyTest branch 5 times, most recently from cde969d to 034a085 Compare October 7, 2014 12:47
@cchampet
Copy link
Member Author

cchampet commented Oct 7, 2014

Problem: Travis doesn't found nosetests command.

@fabiencastan
Copy link
Contributor

apt-get install -qq python-nose

@cchampet cchampet force-pushed the dev_pyTest branch 4 times, most recently from 3a0896d to d1e852a Compare October 8, 2014 15:27
@cchampet cchampet force-pushed the dev_pyTest branch 15 times, most recently from d7d06c5 to d3b3c56 Compare October 21, 2014 12:25
* Travis failed if tests failed.
* Launch tests on Linux (with ffmpeg 2.2.9) and MacOS (with ffmpeg
2.2.3).
@cchampet
Copy link
Member Author

I did not succeed to add and install the FFmpeg version I wanted with the daily updated package. Ubuntu took a too old FFmpeg version...
And I think this is a good thing to launch tests with exactly the FFmpeg version we want (and give as advice to the users to use the same version).
So I build FFmpeg 2.2.9 on Linux, and build Avtranscoder with it.
On MacOS, I found a bottles with FFmpeg 2.2.3, and build Avtranscoder with it (but currently Travis issue with MacOS maybe...).

@cchampet
Copy link
Member Author

What do you think @MarcAntoine-Arnaud ? ;)

Clement Champetier added 3 commits October 22, 2014 19:08
FFmpeg's homebrew formula is 2.4.2! No need to looking for a bottle of
FFmpeg elsewhere.
* After audio rewrap, check:
     * format
     * the audio stream
* After video rewrap, check:
     * format
     * the video stream
avcodec_close( _codecContext );
av_free( _codecContext );
_codecContext = NULL;
if( ! _codecContext )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would not it be if( _codecContext ) instead of if( ! _codecContext ) ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed with @valnoel

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh my mistake, so currently i free nothing !

Clement Champetier added 2 commits October 23, 2014 15:26
* Close and free avcodec in destructor only if AVCodecContext and AVCodec
are not NULL.
* Generator Video / Audio: get a pointer to an ICodec, because we set its codec from the outside (method setVideoCodec / setAudioCodec). And this codec outside will be free elsewhere.
* Cast only one time (for video or audio cases).
* Use reference when cast (it was not the case for video).
MarcAntoine-Arnaud added a commit that referenced this pull request Oct 23, 2014
@MarcAntoine-Arnaud MarcAntoine-Arnaud merged commit 1002196 into avTranscoder:master Oct 23, 2014
@cchampet cchampet deleted the dev_pyTest branch October 27, 2014 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants