[pytest-dev] pytest sprint

Sivan Greenberg sivan at vitakka.co
Tue Mar 29 04:59:48 EDT 2016


Hi Florian,

 Could we have met in the past during aKademy or Qt Summit ? Your nick &
name ring familiar.

On Sun, Mar 27, 2016 at 7:39 PM, Florian Bruhin <me at the-compiler.org> wrote:

> Oh, interesting! Do you have a link? I use pytest to test
> qutebrowser[1], which is my PyQt-based browser, so I'd be really
> interested in seeing how you approached this :)
>
>
I'm mostly just starting out, being an avid user of pyunit , moving to
pytest  to test PyQt5 I had to get rid of a module scoped QApplication as
this caused crashes for some reason, and now I'm wrapping QApplication
inside the namespace of the tested object, to overcome the unexpected
asynchronous event driven nature of a QtWebKit  as so :

class MechBrowser(QApplication):
    myobj = None
    scenario = None
    result  = None
    def __init__(self, buf):
        QApplication.__init__(self, sys.argv)
        self.myobj = MyObj()
        self.scenario = json.loads(buf)i
        self.myobj.loadFInished.connect(self.finished)
        QTimer.singeShot(0, self.run_scenario)
        self.exec_()

   def finished(self, data):
       self.result = json.dumps(data, indent=True)
       self.exit()

   def run_scenario(self):
      self.myobj.execute_scenario(self.scenario)




> Have you seen pytest-qt[2]?
>
>
I haven't! Thanks much for pointing it out, it could have made things much
easier and quicker for me as it seems, I wonder if it needs T&L that the
sprint could provide it :) QuteBrowser seems cool as well, but haven't had
a chance to test it, maybe today!


>
> There is a Freiburg/Fribourg in Switzerland, but that's *not* where
> the sprint is. It's in "Freiburg im Breisgau" in the black forest
> (Schwarzwald) in southern Germany.
>
>
I've heard nice stories about the black forest, there's even a cake by that
name right?


> However, swiss airports (Basel/Zurich) might be a good point to fly to
> and then take a train. Another possibility is flying to Frankfurt or
> Stuttgart and taking the train from there.
>
>
Frankfurt AP is like second home to me, that seems the probable plan.

P.S, Sorry for delayed response, didn't have a chance to attend to this
until now..

-Sivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20160329/c4a61c49/attachment.html>


More information about the pytest-dev mailing list