[pytest-dev] plugins/pytest-qt and cx_Freeze

Bruno Oliveira nicoddemus at gmail.com
Thu Jun 18 17:24:24 CEST 2015


Nice, thanks for sharing! :)

Cheers,

On Thu, Jun 18, 2015 at 12:21 PM Florian Bruhin <me at the-compiler.org> wrote:

> > Another solution would be to explicitly pass the plugin in the command
> line
> > using `-p pytestq.plugin`.
>
> Sorry for the double-post - I found an (IMHO) slightly better solution
> :)
>
> As said before I'm using a separate test executable, and I noticed
> pytest.main takes a plugins-argument with a list of plugin entry
> points.
>
> I now changed the script to import the plugins and run pytest
> accordingly:
>
>
> https://github.com/The-Compiler/qutebrowser/commit/060a7ea044cfac140c53d84258dc2857d058dfc2
>
> Contrary to the other solutions, this makes cx_Freeze realize it
> should also freeze those modules, as they're imported in the script
> which gets frozen - so there's less duplication.
>
> The only thing I had to give cx_Freeze a little hint about is the
> import of the PyQt5.QtTest module, as it's unused in my project
> otherwise, but pytest-qt uses it - and it uses a compatibility layer
> which causes cx_Freeze to not pick this up.
>
> Florian
>
> --
> http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
>    GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
>          I love long mails! | http://email.is-not-s.ms/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20150618/66b7fbc6/attachment.html>


More information about the pytest-dev mailing list