Friday, November 26, 2010

SBR600 Project "fedpkg Test Suite" -- release 0.2

For testing fedpkg library functions, I wrote 4 tests. Nothing is significant. It's really about "finding the way in the wood". I mean, even I got myself familiar with Python syntax, when come to a real program, I still can't understand half of it. So it took some time to find the clue in the program. Another thing is to learn "unittest". I scrach the surface of it but still need time to know how to use the functions.

I put my test file in my matrix account. I took the __init__.py file from fedpkg and renamed it to pyfedpkg.py. I have two tests on clone, a test on commit and a test on _run_command. They are quite trivel. I will continue to work on them toward my next release. The output of my test is pasted as following.

[zwang98@dell fedpkg]$ ./test_fedpkg.py
Cloning into nled...
remote: Counting objects: 82, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 82 (delta 38), reused 82 (delta 38)
Receiving objects: 100% (82/82), 8.20 KiB, done.
Resolving deltas: 100% (38/38), done.
nled/nled.spec
.Cloning into bind...
ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly
user is not valid
.fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
commit must have an argument
.nled/passwd
.
----------------------------------------------------------------------
Ran 4 tests in 7.279s

OK

No comments:

Post a Comment