[TIP] Should pytest work with stand-alone python executables built with PyInstaller and similar?

Bruno Oliveira nicoddemus at gmail.com
Tue Oct 2 04:29:33 PDT 2018


Hi Tony,

> Since the tests I've written for my application work when the application
Is a .py file, should these tests also work when my application is bundled
into a single-file executable, built with PyInstaller, or similar bundling
tool?

I have the exact same requirement at work. Please see these docs for a
solution:

https://docs.pytest.org/en/latest/example/simple.html?highlight=freeze_includes#freezing-pytest

Hope that helps,
Bruno.

On Tue, Oct 2, 2018 at 1:27 AM Tony Cappellini <cappy2112 at gmail.com> wrote:

>
> I've written some tests with pytest, and now need to distribute a
> single-file executable
> on systems that do not have Python installed. I need to do this for Mac,
> Linux and Windows.
>
> Since the tests I've written for my application work when the application
> Is a .py file, should these tests also work when my application is bundled
> into a single-file executable, built with PyInstaller, or similar bundling
> tool?
>
> thanks
>
> Tony
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20181002/6cad31ac/attachment.htm>


More information about the testing-in-python mailing list