[TIP] coverage.py against a server

Lucian Ciufudean lucian.ciufudean at gmail.com
Wed Sep 18 00:42:33 PDT 2013


Here is how I ran coverage:

    coverage run --source=../src main.py

main.py imports a pyc file that resides in the same folder. The source of
this pyc file is available in ../src.
(I created main.py just to go around the bug that you submitted above)

Lucian


On Wed, Sep 18, 2013 at 5:05 AM, Ned Batchelder <ned at nedbatchelder.com>wrote:

>  On 9/17/13 7:42 AM, Lucian Ciufudean wrote:
>
> Hi guys,
>
>  I embarked on the road of obtaining a coverage report for functional
> tests against a server process. The server is deployed as .pyc files, and
> the source files can be made available in a separate subversion working
> folder. I wouldn't want to edit any existing .py files.
>
>  Can coverage work with .pyc files - I am getting errors when using
> coverage run main.pyc from the command line, so maybe with the API?
>
>
> Hmm, you're right: "coverage run foo.pyc" does not work. I've created a
> ticket for this:
> https://bitbucket.org/ned/coveragepy/issue/264/coverage-wont-run-pyc-files
>
>
>  I tired this also, my custom code is run but it can not find the source
> files at the time of coverage.html_report() although I passed the directory
> of source files to coverage.coverage.
>
>
> You'll have to show details of how you tried to run coverage.  If the .py
> files are in the places reported by your program, then it should work.  You
> can also use the [paths] section of a .coveragerc to instruct coverage
> where the files are.
>
> --Ned.
>
>
>  Thanks a lot,
> Lucian
>
>
> _______________________________________________
> testing-in-python mailing listtesting-in-python at lists.idyll.orghttp://lists.idyll.org/listinfo/testing-in-python
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20130918/fc4d9ae1/attachment.htm>


More information about the testing-in-python mailing list