Successful PyUnit testing of login feature from within PyCharm IDE
Let me be honest about one thing : I don't have any draft outline for contents written in this blog. All of these articles were written in the spirit of improvisation and freedom to think/write/speech. For example, although I have been one of Qt fans since it was still owned by Trolltech, I have not the slightest idea that there will be a Qt series here. Even though I knew that Qt is supported in Python through PyQt, I am not that curious to start writing articles about it here. Only after I wrote this article, which lead me to Kivy that I began to experience something thrilling : doing Android development using pure Python! While I work on Kivy though, I also explore were there any alternatives to Android development using Python? Or in general, "Can we develop Android application without the use of Java?". The answer to this question bring me to (amongst other things) : Qt in Android. In which in Qt Project website itself, Python is listed as the most prominence third party programming language binding having Qt support! That was such a great news... Hence, our Qt series articles was born..
Another example is an answer around this question, "In this Qt series, what is the application that we are going to build?". Plain answer? No idea. Well, not that completely blind for sure. I just know that it must be a data aware application. And in the process of its development, it must be prefaced with a practical introduction to Test Driven Development(TDD). Combining both requirements, bring us to this current article : database support in either C++ Qt or PySide/PyQt. To keep things interesting, in this article we will officially use two IDEs : QtCreator for cross platform C++ Qt development and PyCharm for its Python counterpart.
Now that I have your attention ladies and gentlemen, lets drill on this cool talk about database support in Qt using either C++ or Python! Enjoy your time and .. happy reading!
Discipline, I say! - Mark Pilgrim in Dive Into Python 3
Throughout my articles in this site, this is the first article that started without a fancy image : I started it with a quote from Mark Pilgrim's book, Dive Into Python 3, Chapter 9 - Unit Testing. There are two things that drive the decision to include this quote:
Before jumping to the topic on how to build the application GUI with Qt using Qt Designer and use the resultant *.ui file into a C++ or Python application, I would like to preface it with an important concept in software development methodology : Test Driven Development and Unit Testing using either C++ or Python. To streamlined the discussion, I have already summarized the principles of TDD in the above passage, and not about to dive any further (except by giving credit to Kent Beck who developed/rediscovered the technique). In the rest of the article we are about to have a practical hands-on in developing unit testing code using either C++ (or to be exact using QtTest) and Python.
Let's explore it!
Copyright(c) 2014 - PythonBlogs.com
All rights reserved