I have been coding in Python for a few years now. I now want to write a "proper" package foo that will have the following "features":
- Can be installed by setuputils
- will contain sub packages bar, baz and foobar
- Each of the sub packages will contain classes (as opposed to free functions)
- The whole package can be unittested, as I develop it (i.e. using TDD)
So, in essence, what I'm asking is:
How can I use TDD to build a fully tested package containing sub packages?
Assuming the packages have the following classes:
foo/
FooClass1:
method1()
method2()
FooClass2
method1()
method2()
/bar
BarClass1
method1()
method2()
BarClass2
method1()
method2()
/baz
BazClass1
method1()
method2()
BazClass2
method1()
method2()
Can anyone provide guidlines (pref with sample code), on how to go about developing such a fully unit tested package?
I will be developing the package using Python 3.x
Aucun commentaire:
Enregistrer un commentaire