Pytest in Ubuntu 16.04 finished with code 1

Jenyay's Avatar

Jenyay

17 Mar, 2019 09:47 AM

Hello.
I am developing the project with Python and wxPython. xvfb-run and pytest are used to run tests. Some time ago (noticed 2 weeks ago, but maybe the problem appeared earlier) tests began to fail with the message "Build exited with code 1" after the first test. No more error messages. For example - https://ci.appveyor.com/project/Jenyay/outwiker/builds/23133185

I also noticed that Python 3.5.2 is used, but Python 3.5.6 is specified in appveyor.yml.

  1. Support Staff 1 Posted by Owen McDonnell on 17 Mar, 2019 05:40 PM

    Owen McDonnell's Avatar

    I don't really know much about the intricacies of python environments but you can see here in this build that the stack construct seems to be working fine.

    Maybe you need to forego installing python3 with apt-get and just install pipenv with python command which is already set to version 3.5.6, as demonstrated in the build i linked to.

  2. 2 Posted by Jenyay on 17 Mar, 2019 06:32 PM

    Jenyay's Avatar

    I moved pipenv installing from "init" section to "install" and the Python version has become 3.5.6. But tests still fall for no apparent reason. It seems that the first test in which GUI is created falls.

    New build log here - https://ci.appveyor.com/project/Jenyay/outwiker/builds/23138810

  3. Support Staff 3 Posted by Owen McDonnell on 19 Mar, 2019 12:19 AM

    Owen McDonnell's Avatar

    What if you try running your tests without the xvfb-run wrapper?

  4. 4 Posted by Jenyay on 20 Mar, 2019 07:14 PM

    Jenyay's Avatar

    It turned out that the initial problem was caused by the crash of a third-party library. Without xvfb-run wxPython does not work at server and all GUI tests fall. I run all the tests locally without xvfb-run.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac