Re: Preventing network access during nose doctest ?
[Olivier Berger, 2014-05-12]
> I'm trying to fix #739222 where tests fail (-> FTBFS) during execution
> of nose's doctest plugin on something like :
> >>> import rdflib
>
> >>> g = rdflib.Graph()
> >>> result = g.parse("http://www.w3.org/2000/10/swap/test/meet/white.rdf")
>
> >>> print("graph has %s statements." % len(g))
> graph has 19 statements.
>
> I'm puzzled : I'm invoking the tests run with :
> PYBUILD_SYSTEM=custom \
> PYBUILD_TEST_ARGS="{interpreter} run_tests.py" \
> http_proxy= https_proxy= \
> dh_auto_test --buildsystem=pybuild
>
> where run_tests.py will invoke nose with --with-doctest, but even though
> the HTTP proxy variables being set, they don't seem to be preventing
> urllib2 to try to access the file.
remove "http_proxy= https_proxy=" line and pybuild will try to block
internet connection (and you will be able to figure out which test
tries to access network and fix/disable it)
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
Reply to: