← Back to team overview

dulwich-users team mailing list archive

Re: Test runners, nose and python 2.7

 

On Sun, Dec 26, 2010 at 18:04, Jelmer Vernooij <jelmer@xxxxxxxxx> wrote:

> On Mon, Dec 27, 2010 at 02:46:51AM +0100, Jelmer Vernooij wrote:
> > On Sun, Dec 26, 2010 at 04:23:54PM -0500, Augie Fackler wrote:
> > > >> We can codify that in setup.py and make
> > > >> it the One True Test System (and depending on unittest2 for old
> > > >> Pythons means that we can continue using the normal SkipTest
> > > >> approach *and* dispense with the madness in test/__init__ that tries
> > > >> to get the "right" SkipTest. I'm happy to take on this work if
> > > >> nobody objects.
> > > > I can live with unittest2 as default fallback test runner but
> > > > would like to keep the support for using testtools without the need
> to
> > > > install unittest2. What do you think about the attached patch?
> > > Should probably also list unittest2 in the test_requires stanza of the
> > > setup() call in setup.py if sys.version < (2,7).
> > That's a good point.
> I've pushed the switch to unittest + unittest2 but without the
> test_requires stanza.
> Not having it doesn't seem to break anything (we never had it for nose) and
> I can't
> work out what to set exactly. Patches to add it welcome.


I haven't been following this discussion closely, but what you just pushed
fails on 2.6 even after installing (with pip) unittest2 and testtools (trace
below).

I don't really care what the ultimate answer is, but I'd appreciate it if
you could run any more potential fixes by me so I can try the tests against
master with my setup.

git checkout origin/master && git clean -f -x -d && make check
HEAD is now at 79f0b96... Use unittest or unittest2 test runner instead of
nose for running tests from the testsuite.
Removing build/
Removing dulwich/_diff_tree.so
Removing dulwich/_objects.so
Removing dulwich/_pack.so
python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/dulwich
copying dulwich/server.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/pack.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/object_store.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/index.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/client.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/protocol.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/errors.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/fastexport.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/patch.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/__init__.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/log_utils.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/web.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/file.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/repo.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/objects.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/_compat.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/diff_tree.py -> build/lib.linux-x86_64-2.6/dulwich
copying dulwich/lru_cache.py -> build/lib.linux-x86_64-2.6/dulwich
creating build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_protocol.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_object_store.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_repository.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_client.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_patch.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_index.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_file.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_fastexport.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_web.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_objects.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_pack.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_blackbox.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/__init__.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/utils.py -> build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_lru_cache.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_diff_tree.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
copying dulwich/tests/test_server.py ->
build/lib.linux-x86_64-2.6/dulwich/tests
running build_ext
building 'dulwich._objects' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/dulwich
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c dulwich/_objects.c -o
build/temp.linux-x86_64-2.6/dulwich/_objects.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-x86_64-2.6/dulwich/_objects.o -o
build/lib.linux-x86_64-2.6/dulwich/_objects.so
building 'dulwich._pack' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c dulwich/_pack.c -o
build/temp.linux-x86_64-2.6/dulwich/_pack.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-x86_64-2.6/dulwich/_pack.o -o
build/lib.linux-x86_64-2.6/dulwich/_pack.so
building 'dulwich._diff_tree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c dulwich/_diff_tree.c
-o build/temp.linux-x86_64-2.6/dulwich/_diff_tree.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-x86_64-2.6/dulwich/_diff_tree.o -o
build/lib.linux-x86_64-2.6/dulwich/_diff_tree.so
running build_scripts
creating build/scripts-2.6
copying and adjusting bin/dulwich -> build/scripts-2.6
copying and adjusting bin/dul-daemon -> build/scripts-2.6
copying and adjusting bin/dul-web -> build/scripts-2.6
changing mode of build/scripts-2.6/dulwich from 640 to 755
changing mode of build/scripts-2.6/dul-daemon from 640 to 755
changing mode of build/scripts-2.6/dul-web from 640 to 755
python setup.py build_ext -i
running build_ext
copying build/lib.linux-x86_64-2.6/dulwich/_objects.so -> dulwich
copying build/lib.linux-x86_64-2.6/dulwich/_pack.so -> dulwich
copying build/lib.linux-x86_64-2.6/dulwich/_diff_tree.so -> dulwich
PYTHONPATH=. python -m unittest2 dulwich.tests.test_suite
/home/dborowitz/.virtualenvs/dulwich/bin/python: unittest2 is a package and
cannot be directly executed
make: *** [check] Error 1



>  Cheers,
>
> Jelmer
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dulwich-users
> Post to     : dulwich-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dulwich-users
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References