<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        I also have a branch that exposes some odd behavior. The unittests<div> all pass locally on my machine, but the tests crash <span style="font-size: 10pt">when running in gitlab ci.</span><span style="font-size: 10pt"> </span></div><div><span style="font-size: 10pt">Both are running with the pytest runner, but local succeeds and gitlab fails.</span></div><div><span style="font-size: 10pt">I haven't really had a chance to dig into that issue yet. Maybe someone has</span></div><div><span style="font-size: 10pt">some insight on why the tests would pass locally but fail on gitlab?</span></div><div><div><span style="font-size: 10pt"><br></span></div><div><span style="font-size: 10pt">That same branch also has the application </span><span style="font-size: 10pt">tests re-enabled with no</span></div><div><span style="font-size: 10pt">segfaults, but a couple of the tests do fail. (because of a shared_memory </span></div><div><span style="font-size: 10pt">attribute that doesn't seem to exist in the OpenLP class?)</span><div><div><br></div><div>Here's the branch:</div><div><a href="https://gitlab.com/benjaminhoving/openlp/tree/test_fix"><span style="font-size: 10pt">https://gitlab.com/benjaminhoving/openlp/tree/test_fix</span></a></div></div></div></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">On 10/10/2019 1:38:28 AM, Raoul Snyman via openlp-dev <openlp-dev@openlp.io> wrote:</p><div style="font-family:Arial,Helvetica,sans-serif">So I did some more digging... some observations:<br><br>1. The segfaults I'm running into are all in pytest's collection phase.<br>2. After a bunch of messing around I found two segfaults:<br>    - In settings.py, setting shortcuts when creating a new Settings <br>object<br>    - In icons.py, getting the palette when creating a new UiIcons object<br>3. Both segfaults are due to no QApplication object existing at the <br>time.<br><br> From this I can surmise that when collecting tests, pytest somehow runs <br>the test methods, but doesn't run setUp or tearDown. Another reason to <br>move to pytest fixtures, I guess.<br><br>With some defensive programming techniques in those two classes, I was <br>able to get past collection. I re-enabled the application tests, and now <br>I'm running into a segfault there, but it's at least further than I was <br>previously getting.<br><br>Additionally, I removed the "global" QApplication object, and I <br>introduced a "teardown_application()" to remove the app object.<br><br>I've pushed this code up to here, if anyone is interested:<br><br>https://gitlab.com/superfly/openlp/commit/6736c02c2dcc57343ca5a9e764fbf98a4c5c67e1<br><br>-- <br>Raoul Snyman<br>raoul@snyman.info<br>_______________________________________________<br>openlp-dev mailing list<br>openlp-dev@openlp.io<br>https://lists.openlp.io/mailman/listinfo/openlp-dev<br></div></blockquote></div>