Merge branch 'python-tests'

master
Marius Bakke 2017-03-03 16:55:43 +01:00
commit 3f98071ac5
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
23 changed files with 1246 additions and 327 deletions

View File

@ -856,14 +856,18 @@ dist_patch_DATA = \
%D%/packages/patches/python-3-search-paths.patch \
%D%/packages/patches/python-3.4-fix-tests.patch \
%D%/packages/patches/python-3.5-fix-tests.patch \
%D%/packages/patches/python-dendropy-fix-tests.patch \
%D%/packages/patches/python-file-double-encoding-bug.patch \
%D%/packages/patches/python-fix-tests.patch \
%D%/packages/patches/python-parse-too-many-fields.patch \
%D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
%D%/packages/patches/python-statsmodels-fix-tests.patch \
%D%/packages/patches/python-configobj-setuptools.patch \
%D%/packages/patches/python-fake-factory-fix-build-32bit.patch \
%D%/packages/patches/python-paste-remove-website-test.patch \
%D%/packages/patches/python-paste-remove-timing-test.patch \
%D%/packages/patches/python-pygit2-disable-network-tests.patch \
%D%/packages/patches/python-pyopenssl-skip-network-test.patch \
%D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \
%D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
%D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \

View File

@ -1699,15 +1699,29 @@ throughput (in the same interval).")
(base32
"04q2cn8c83f6z6wn1scla1ilrpi5ssjc64987hvmwfvwvb82bvkp"))))
(build-system python-build-system)
(inputs
(arguments
'(#:tests? #f))
;; FIXME: 10 test failures. Some require newer pytest (> 2.9.2).
;; Others need more work. Un-comment the below to run the tests.
;; #:phases
;; (modify-phases %standard-phases
;; (replace 'check
;; (lambda _
;; ;; Some tests need write access to $HOME.
;; (setenv "HOME" "/tmp")
;; (zero? (system* "py.test" "-v")))))))
(propagated-inputs
`(("python-colorama" ,python-colorama)
("python-decorator" ,python-decorator)
("python-psutil" ,python-psutil)
("python-six" ,python-six)))
(native-inputs
;; Requires setuptools >= 17.1 due to some features used, while our
;; python currently only includes 12.0. TODO: Remove this input.
`(("python-setuptools" ,python-setuptools)))
`(("python-mock" ,python-mock)
("python-pytest" ,python-pytest)
("python-pytest-mock" ,python-pytest-mock)
;; Requires setuptools >= 17.1 due to some features used, while our
;; python currently only includes 12.0. TODO: Remove this input.
("python-setuptools" ,python-setuptools)))
(home-page "https://github.com/nvbn/thefuck")
(synopsis "Correct mistyped console command")
(description

View File

@ -67,6 +67,7 @@
(build-system python-build-system)
(native-inputs
`(("util-linux" ,util-linux) ;setsid command, for the tests
("par2cmdline" ,par2cmdline)
("python-pexpect" ,python2-pexpect)
("mock" ,python2-mock)))
(propagated-inputs
@ -83,16 +84,18 @@
#:test-target "test"
#:phases
(modify-phases %standard-phases
(add-before
'build 'patch-source ; embed gpg store name
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "duplicity/gpginterface.py"
(("self.call = 'gpg'")
(string-append "self.call = '" (assoc-ref inputs "gnupg") "/bin/gpg'")))))
(add-before 'build 'patch-source
(lambda* (#:key inputs #:allow-other-keys)
;; embed gpg store name
(substitute* "duplicity/gpginterface.py"
(("self.call = 'gpg'")
(string-append "self.call = '" (assoc-ref inputs "gnupg") "/bin/gpg'")))
(substitute* '("testing/functional/__init__.py"
"testing/overrides/bin/lftp")
(("/bin/sh") (which "sh")))
#t))
(add-before 'check 'check-setup
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "testing/functional/__init__.py"
(("/bin/sh") (which "sh")))
(setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
(setenv "TZDIR" ;some timestamp checks need TZDIR
(string-append (assoc-ref inputs "tzdata")

View File

@ -499,6 +499,9 @@ provides the Ribotaper pipeline.")
("python-matplotlib" ,python2-matplotlib)
("python-scipy" ,python2-scipy)
("python-statsmodels" ,python2-statsmodels)))
(native-inputs
`(("python-mock" ,python2-mock)
("python-nose" ,python2-nose)))
(home-page "http://public.bmi.inf.ethz.ch/user/zhongy/RiboDiff/")
(synopsis "Detect translation efficiency changes from ribosome footprints")
(description "RiboDiff is a statistical tool that detects the protein
@ -604,6 +607,8 @@ Python.")
("python-future" ,python-future)
("python-click" ,python-click)
("python-h5py" ,python-h5py)))
(native-inputs
`(("python-nose" ,python-nose)))
(home-page "http://www.biom-format.org")
(synopsis "Biological Observation Matrix (BIOM) format utilities")
(description
@ -1602,6 +1607,7 @@ databases.")
("python-scipy" ,python2-scipy)))
(native-inputs
`(("python-mock" ,python2-mock) ; for tests
("python-nose" ,python2-nose) ; for tests
("python-pytz" ,python2-pytz))) ; for tests
(home-page "https://github.com/YeoLab/clipper")
(synopsis "CLIP peak enrichment recognition")
@ -1978,7 +1984,8 @@ accessing bigWig files.")
(uri (pypi-uri "DendroPy" version))
(sha256
(base32
"15c7s3d5gf19ljsxvq5advaa752wfi7pwrdjyhzmg85hccyvp47p"))))
"15c7s3d5gf19ljsxvq5advaa752wfi7pwrdjyhzmg85hccyvp47p"))
(patches (search-patches "python-dendropy-fix-tests.patch"))))
(build-system python-build-system)
(home-page "http://packages.python.org/DendroPy/")
(synopsis "Library for phylogenetics and phylogenetic computing")
@ -2030,6 +2037,7 @@ trees (phylogenies) and characters.")
("python-pybigwig" ,python2-pybigwig)))
(native-inputs
`(("python-mock" ,python2-mock) ;for tests
("python-nose" ,python2-nose) ;for tests
("python-pytz" ,python2-pytz))) ;for tests
(home-page "https://github.com/fidelram/deepTools")
(synopsis "Tools for normalizing and visualizing deep-sequencing data")
@ -2969,28 +2977,10 @@ data. It also provides the bgzip, htsfile, and tabix utilities.")
"1k3x44biak00aiv3hpm1yd6nn4hhp7n0qnbs3zh2q9sw7qr1qj5r"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after
'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(python-version (string-take (string-take-right
(assoc-ref inputs "python") 5) 3))
(path (string-join
(map (lambda (name)
(string-append (assoc-ref inputs name)
"/lib/python" python-version
"/site-packages"))
'("python-scipy"
"python-numpy"
"python-matplotlib"))
":")))
(wrap-program (string-append out "/bin/idr")
`("PYTHONPATH" ":" prefix (,path))))
#t)))))
(inputs
`(#:tests? #f)) ; FIXME: "ImportError: No module named 'utility'"
(propagated-inputs
`(("python-scipy" ,python-scipy)
("python-sympy" ,python-sympy)
("python-numpy" ,python-numpy)
("python-matplotlib" ,python-matplotlib)))
(native-inputs
@ -3679,6 +3669,9 @@ the phenotype as it models the data.")
(build-system python-build-system)
(arguments
`(#:python ,python-2
;; FIXME: Tests fail with "No such file or directory:
;; pbtools/pbtranscript/modified_bx_intervals/intersection_unique.so"
#:tests? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-directory

View File

@ -125,7 +125,7 @@ data units.")
`(("sqlite" ,sqlite)))
(propagated-inputs
`(("python-configobj" ,python-configobj)
("python-dateutil-2" ,python-dateutil-2)
("python-dateutil" ,python-dateutil)
("python-icalendar" ,python-icalendar)
("python-tzlocal" ,python-tzlocal)
("python-urwid" ,python-urwid)

View File

@ -106,6 +106,10 @@ to the @dfn{don't repeat yourself} (DRY) principle.")
(base32
"0906hms6y6znjhpd0g4wmzv9vcla4brkdpsm4zha9zdj8g5vq2hd"))))
(build-system python-build-system)
(arguments
;; FIXME: Upstream uses a 'runtests.py' script that is not
;; present in the pypi tarball.
'(#:tests? #f))
(propagated-inputs
`(("python-django" ,python-django)))
(home-page "https://github.com/alsoicode/django-simple-math-captcha")
@ -131,7 +135,8 @@ with arguments to the field constructor.")
"1mmc7zsz3dlhs6sx4sppkj1vgshabi362r1a8b8wpj1qfximpqcb"))))
(build-system python-build-system)
(arguments
`(#:phases
`(#:tests? #f ; FIXME: How to run tests?
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-setuppy
(lambda _
@ -163,6 +168,12 @@ useful tools for testing Django applications and projects.")
(base32
"0f78hmk8c903zwfzlsiw7ivgag81ymmb5hi73rzxbhnlg2v0l3fx"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(zero? (system* "python" "runtests.py")))))))
(native-inputs
`(("python-django" ,python-django)
("python-mock" ,python-mock)))

View File

@ -253,7 +253,17 @@ embedded systems.")
(lambda _
(setenv "CFLAGS"
(string-append "-I" (assoc-ref %build-inputs "python-dbus")
"/include/dbus-1.0")))))))
"/include/dbus-1.0"))
#t))
(add-before 'check 'set-environment
(lambda _
;; Some tests require write access to HOME.
(setenv "HOME" "/tmp")
#t)))
;; FIXME: Some tests require a running D-Bus server or a network
;; connection and should be disabled. Other test failures looks
;; legitimate. Disabled for now, needs work!
#:tests? #f))
(native-inputs
`(("pkg-config" ,pkg-config)
("python-cython" ,python-cython)))

View File

@ -48,7 +48,7 @@
("python-pytz" ,python-pytz)
("python-tzlocal" ,python-tzlocal)
("python-six" ,python-six)
("python-dateutil" , python-dateutil-2)
("python-dateutil" ,python-dateutil)
("python-parsedatetime" ,python-parsedatetime)))
(home-page "http://maebert.github.io/jrnl/")
(synopsis "Personal journal application")

View File

@ -1512,7 +1512,11 @@ maintained.")
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(doc (string-append out "/share/doc/khard")))
(copy-recursively "misc/khard" doc)))))))
(copy-recursively "misc/khard" doc)
#t))))
;; FIXME: check phase fails with
;; "Config file /tmp/.config/khard/khard.conf not available"
#:tests? #f))
(propagated-inputs
`(("python-vobject" ,python-vobject)
("python-pyyaml" ,python-pyyaml)

View File

@ -2061,6 +2061,8 @@ detailed track info including timbre, pitch, rhythm and loudness information.
(base32
"0bml11gfkxqd3i2jxkn5k2xllc4rvxjcyhs8an05gcyy1zp2bwvb"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Requires unpackaged python-flaky.
(native-inputs
`(("python-coverage" ,python-coverage)
("python-mock" ,python-mock)

View File

@ -19,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages openstack)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages python)
#:use-module (gnu packages ssh)
#:use-module (gnu packages tls)
@ -64,10 +65,16 @@
To do this Bandit processes each file, builds an AST from it, and runs
appropriate plugins against the AST nodes. Once Bandit has finished scanning
all the files it generates a report.")
(properties `((python2-variant . ,(delay python2-bandit))))
(license asl2.0)))
(define-public python2-bandit
(package-with-python2 python-bandit))
(package (inherit (package-with-python2
(strip-python2-variant python-bandit)))
(arguments
`(#:python ,python-2
;; FIXME: 'subunit.run discover: error: no such option: --list'
#:tests? #f))))
(define-public python-debtcollector
(package
@ -81,6 +88,8 @@ all the files it generates a report.")
(base32
"0g4dfskaiy47rhsh4gh66l5vmdsrgq0qk68pl3ix1cj3ffvfndzv"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ;FIXME: Requires packaging python-doc8.
(propagated-inputs
`(("python-six" ,python-six)
("python-wrapt" ,python-wrapt)))
@ -113,6 +122,9 @@ manner.")
(base32
"1a310k3dv04jg7zvmk37h2ql7y9kf4hvdxb74bjlwdxgmy6h4wap"))))
(build-system python-build-system)
(arguments
;; TODO: Requires unpackaged 'eventlet'.
'(#:tests? #f))
(propagated-inputs
`(("python-flake8-2.2.4" ,python-flake8-2.2.4)
("python-mccabe-0.2.1" ,python-mccabe-0.2.1)
@ -146,9 +158,14 @@ guidelines}.")
(base32
"0njmh40i1lg5mzn9hc2ax83adj6dli455j6xifilrw27c4wlkjzx"))))
(build-system python-build-system)
(arguments
;; TODO: Resolve dependency cycle and re-enable.
'(#:tests? #f))
(native-inputs
`(("python-fixtures" ,python-fixtures)
; TODO re-add ("python-oslosphinx" ,python-oslosphinx)
("python-pbr" ,python-pbr)
("python-sphinx" ,python-sphinx)
("python-testtools" ,python-testtools)))
(home-page "http://www.openstack.org/")
(synopsis "Mock object framework for Python")
@ -234,14 +251,14 @@ tested on Python version 3.2, 2.7 and 2.6.")
(define-public python-requests-mock
(package
(name "python-requests-mock")
(version "1.0.0")
(version "1.3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "requests-mock" version))
(sha256
(base32
"0gcjjwsckhqixyffflc54i59x41jnbb37bli077vabii1bjmkin6"))))
"0jr997dvk6zbmhvbpcv3rajrgag69mcsm1ai3w3rgk2jdh6rg1mx"))))
(build-system python-build-system)
(propagated-inputs
`(("python-requests" ,python-requests)
@ -260,10 +277,16 @@ tested on Python version 3.2, 2.7 and 2.6.")
(description
"This module provides a building block to stub out the HTTP requests
portions of your testing code.")
(properties `((python2-variant . ,(delay python2-requests-mock))))
(license asl2.0)))
(define-public python2-requests-mock
(package-with-python2 python-requests-mock))
(package (inherit (package-with-python2
(strip-python2-variant python-requests-mock)))
(arguments
`(#:python ,python-2
;; FIXME: 'subunit.run discover: error: no such option: --list'
#:tests? #f))))
(define-public python-stevedore
(package
@ -282,10 +305,13 @@ portions of your testing code.")
(native-inputs
`(("python-pbr" ,python-pbr)
;; Tests
("python-discover" ,python-discover)
("python-docutils" ,python-docutils)
("python-mock" ,python-mock)
("python-oslosphinx" ,python-oslosphinx)
("python-oslotest" ,python-oslotest)
("python-sphinx" ,python-sphinx)))
("python-sphinx" ,python-sphinx)
("python-testrepository" ,python-testrepository)))
(home-page "https://github.com/dreamhost/stevedore")
(synopsis "Manage dynamic plugins for Python applications")
(description
@ -297,10 +323,16 @@ mechanism by building on top of setuptools entry points. The code for managing
entry points tends to be repetitive, though, so stevedore provides manager
classes for implementing common patterns for using dynamically loaded
extensions.")
(properties `((python2-variant . ,(delay python2-stevedore))))
(license asl2.0)))
(define-public python2-stevedore
(package-with-python2 python-stevedore))
(package (inherit (package-with-python2
(strip-python2-variant python-stevedore)))
(arguments
`(#:python ,python-2
;; FIXME: 'subunit.run discover: error: no such option: --list'
#:tests? #f))))
(define-public python-tempest-lib
(package
@ -315,7 +347,8 @@ extensions.")
"1cpp2vwmawpd29hjsklsps181lq2ah91cl412qvpnz228nf9sqn5"))))
(build-system python-build-system)
(arguments
`(#:phases
`(#:tests? #f ; FIXME: Requires oslo.log >= 1.14.0.
#:phases
(modify-phases %standard-phases
(add-before
'check 'pre-check
@ -362,6 +395,8 @@ common features used in Tempest.")
(base32
"13r778jfb0fhna37c2pd1f2xipnsbd7zli7qhn96acrzymrwj5k1"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Requires packaging python-argparse.
(propagated-inputs
`(("python-netaddr" ,python-netaddr)
("python-six" ,python-six)
@ -395,11 +430,19 @@ common features used in Tempest.")
(base32
"0kvha0rs9295njyl2z6n6zm5dapi5mrl5zwjm0m6ldqrvccyf8c3"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Requires python-mock >= 1.2.
(native-inputs
`(("python-babel" ,python-babel)
("python-pbr" ,python-pbr)
;; Tests.
("python-oslotest" ,python-oslotest)))
("python-coverage" ,python-coverage)
("python-hacking" ,python-hacking)
("python-mock" ,python-mock)
("python-os-client-config" ,python-os-client-config)
("python-oslotest" ,python-oslotest)
("python-oslosphinx" ,python-oslosphinx)
("python-sphinx" ,python-sphinx)))
(home-page "http://launchpad.net/oslo")
(synopsis "Oslo context library")
(description
@ -423,6 +466,8 @@ pipeline and used by various modules such as logging.")
(base32
"0bpb1c20sm8my650gl824nzaip83bfn8hr91s65k5ncmyh8hb6pl"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Circular dependency on python-oslo.config.
(propagated-inputs
`(("python-babel" ,python-babel)
("python-six" ,python-six)))
@ -459,6 +504,8 @@ in an application or library.")
(base32
"1fhy6yvbd565nv4x4i3ppyrlbmz3yy9d0xsvw5nkqsa7g43nmf8z"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Requires oslo.utils >= 3.2.0.
(propagated-inputs
`(("python-debtcollector" ,python-debtcollector)
("python-oslo.config" ,python-oslo.config)
@ -496,6 +543,8 @@ handlers and support for context specific logging (like resource ids etc).")
(base32
"00s03krhf833gs76aw5ns32w9m1i4hx6x6d9g82m0j5wyqk0sci4"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Requires python-oslo.utils >= 3.2.0.
(propagated-inputs
`(("python-iso8601" ,python-iso8601)
("python-netaddr" ,python-netaddr)
@ -520,18 +569,74 @@ in transmittable and storable formats, such as JSON and MessagePack.")
(define-public python2-oslo.serialization
(package-with-python2 python-oslo.serialization))
(define-public python-reno
(package
(name "python-reno")
(version "2.0.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "reno" version))
(sha256
(base32 "1i2wnn5fnm3jm5774pahg000q0lma5i913hml91bbbm2mybphndd"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'check 'init-git
(lambda _
;; reno expects a git repo
(zero? (system* "git" "init")))))))
(propagated-inputs
`(("python-babel" ,python-babel)
("python-dulwich" ,python-dulwich)
("python-pyyaml" ,python-pyyaml)
("python-six" ,python-six)))
(native-inputs
`(("python-testtools" ,python-testtools)
("python-pbr" ,python-pbr)
("python-testscenarios" ,python-testscenarios)
("python-testrepository" ,python-testrepository)
("python-mock" ,python-mock)
("python-oslotest" ,python-oslotest)
("gnupg" ,gnupg)
("git" ,git)))
(home-page "http://docs.openstack.org/developer/reno/")
(synopsis "Release notes manager")
(description "Reno is a tool for storing release notes in a git repository
and building documentation from them.")
(properties `((python2-variant . ,(delay python2-reno))))
(license asl2.0)))
(define-public python2-reno
(package (inherit (package-with-python2
(strip-python2-variant python-reno)))
(arguments
`(#:python ,python-2
;; FIXME: 'subunit.run discover: error: no such option: --list'
#:tests? #f))))
(define-public python-oslosphinx
(package
(name "python-oslosphinx")
(version "4.3.0")
(version "4.10.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "oslosphinx" version))
(sha256
(base32
"0cz8ym4i1n4rgljlqhyhfkpgdmid7nkb909k8r8nk186m9cmpla2"))))
"09mxqyabi68f3s3arvdhlhq0mn38vf74jbsfcg84151hcj6czhnl"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
;; Note: Upstream tests would have also built the release notes.
;; That only would work if we were in a git checkout.
;; Therefore, we don't do it here.
(zero? (system* "python" "setup.py" "build_sphinx")))))))
(propagated-inputs
`(("python-requests" ,python-requests)))
(native-inputs
@ -581,10 +686,16 @@ from the OpenStack project.")
(description
"The Oslo Test framework provides common fixtures, support for debugging,
and better support for mocking results.")
(properties `((python2-variant . ,(delay python2-oslotest))))
(license asl2.0)))
(define-public python2-oslotest
(package-with-python2 python-oslotest))
(package (inherit (package-with-python2
(strip-python2-variant python-oslotest)))
(arguments
`(#:python ,python-2
;; FIXME: 'subunit.run discover: error: no such option: --list'
#:tests? #f))))
(define-public python-oslo.utils
(package
@ -603,6 +714,8 @@ and better support for mocking results.")
;; phase.
(delete-file "oslo_utils/tests/test_netutils.py")))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Requires oslo.config >= 2.7.0.
(propagated-inputs
`(("python-debtcollector" ,python-debtcollector)
("python-oslo.i18n" ,python-oslo.i18n)
@ -616,6 +729,8 @@ and better support for mocking results.")
`(("python-babel" ,python-babel)
("python-pbr" ,python-pbr)
;; Tests.
("python-bandit" ,python-bandit)
("python-oslo.config" ,python-oslo.config)
("python-oslotest" ,python-oslotest)
("python-mock" ,python-mock)
("python-mox3" ,python-mox3)
@ -643,6 +758,8 @@ handling.")
(base32
"1w4csvkah67rfpxylxnvs2s3594i0f9isy8pf4gnsqs5zirvjaa4"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; FIXME: Many tests are failing.
(native-inputs
`(("python-sphinx" ,python-sphinx)
;; and some packages for the tests
@ -749,6 +866,10 @@ permanence.")
(define-public python2-swiftclient
(let ((swiftclient (package-with-python2 python-swiftclient)))
(package (inherit swiftclient)
(arguments
`(#:python ,python-2
;; FIXME: subunit.run discover: error: no such option: --list
#:tests? #f))
(propagated-inputs
`(("python2-futures" ,python2-futures)
("python2-requests" ,python2-requests)

View File

@ -0,0 +1,41 @@
This patch fixes two test failures. It was downloaded from:
https://github.com/jeetsukumaran/DendroPy/commit/93f984bba7a6c588a28ca87f4e557ce283809453
From 93f984bba7a6c588a28ca87f4e557ce283809453 Mon Sep 17 00:00:00 2001
From: jeetsukumaran <jeetsukumaran@gmail.com>
Date: Tue, 21 Feb 2017 16:41:01 -0500
Subject: [PATCH] Update to Python 3 container and iteration semantics
---
dendropy/dataio/newickreader.py | 3 ++-
dendropy/datamodel/treemodel.py | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dendropy/dataio/newickreader.py b/dendropy/dataio/newickreader.py
index 6dcf3c5..f978729 100644
--- a/dendropy/dataio/newickreader.py
+++ b/dendropy/dataio/newickreader.py
@@ -303,7 +303,8 @@ def tree_iter(self,
taxon_symbol_map_fn=taxon_symbol_mapper.require_taxon_for_symbol)
yield tree
if tree is None:
- raise StopIteration
+ # raise StopIteration
+ return
def _read(self,
stream,
diff --git a/dendropy/datamodel/treemodel.py b/dendropy/datamodel/treemodel.py
index 0ecfe31..73146f0 100644
--- a/dendropy/datamodel/treemodel.py
+++ b/dendropy/datamodel/treemodel.py
@@ -772,6 +772,9 @@ def __hash__(self):
def __eq__(self, other):
return self is other
+ def __lt__(self, other):
+ return id(self) < id(other)
+
###########################################################################
### Basic Structure

View File

@ -0,0 +1,36 @@
These tests fail on 32-bit due to an overflow.
Upstream bug URL: https://github.com/joke2k/faker/issues/408
diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py
index 6026772..58b6b83 100644
--- a/faker/tests/__init__.py
+++ b/faker/tests/__init__.py
@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase):
provider = Provider
# test century
self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now()))
- self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now()))
# test decade
self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now()))
self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now()))
@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase):
# ensure all methods provide timezone aware datetimes
with self.assertRaises(TypeError):
- provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now()
- with self.assertRaises(TypeError):
provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now()
with self.assertRaises(TypeError):
provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now()
@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase):
# test century
self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc))
- self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc))
# test decade
self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc))
self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc))
--
2.11.1

View File

@ -0,0 +1,28 @@
See: https://bugs.launchpad.net/oslosphinx/+bug/1661861
diff -ur orig/pbr-1.10.0/pbr/builddoc.py pbr-1.10.0/pbr/builddoc.py
--- orig/pbr-1.10.0/pbr/builddoc.py 2016-05-23 21:38:18.000000000 +0200
+++ pbr-1.10.0/pbr/builddoc.py 2017-02-18 14:01:37.424434317 +0100
@@ -138,7 +138,8 @@
sphinx_config.init_values(warnings.warn)
else:
sphinx_config.init_values()
- if self.builder == 'man' and len(sphinx_config.man_pages) == 0:
+ if self.builder == 'man' and len(
+ getattr(sphinx_config, 'man_pages', '')) == 0:
return
app = application.Sphinx(
self.source_dir, self.config_dir,
diff -ur orig/pbr-1.10.0/pbr/util.py pbr-1.10.0/pbr/util.py
--- orig/pbr-1.10.0/pbr/util.py 2016-05-23 21:38:18.000000000 +0200
+++ pbr-1.10.0/pbr/util.py 2017-02-18 15:36:32.951196795 +0100
@@ -211,7 +211,9 @@
parser.read(path)
config = {}
for section in parser.sections():
- config[section] = dict(parser.items(section))
+ config[section] = dict()
+ for k, value in parser.items(section):
+ config[section][k.replace('-', '_')] = value
# Run setup_hooks, if configured
setup_hooks = has_get_option(config, 'global', 'setup_hooks')

View File

@ -0,0 +1,64 @@
Disable tests trying to look up remote servers.
diff --git a/test/test_credentials.py b/test/test_credentials.py
index 92482d9..9a281e5 100644
--- a/test/test_credentials.py
+++ b/test/test_credentials.py
@@ -68,39 +68,5 @@ class CredentialCreateTest(utils.NoRepoTestCase):
self.assertEqual((username, None, None, None), cred.credential_tuple)
-class CredentialCallback(utils.RepoTestCase):
- def test_callback(self):
- class MyCallbacks(pygit2.RemoteCallbacks):
- @staticmethod
- def credentials(url, username, allowed):
- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
- raise Exception("I don't know the password")
-
- url = "https://github.com/github/github"
- remote = self.repo.create_remote("github", url)
-
- self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks()))
-
- def test_bad_cred_type(self):
- class MyCallbacks(pygit2.RemoteCallbacks):
- @staticmethod
- def credentials(url, username, allowed):
- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
- return Keypair("git", "foo.pub", "foo", "sekkrit")
-
- url = "https://github.com/github/github"
- remote = self.repo.create_remote("github", url)
- self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks()))
-
-class CallableCredentialTest(utils.RepoTestCase):
-
- def test_user_pass(self):
- credentials = UserPass("libgit2", "libgit2")
- callbacks = pygit2.RemoteCallbacks(credentials=credentials)
-
- url = "https://bitbucket.org/libgit2/testgitrepository.git"
- remote = self.repo.create_remote("bb", url)
- remote.fetch(callbacks=callbacks)
-
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_repository.py b/test/test_repository.py
index cfdf01e..c0d8de4 100644
--- a/test/test_repository.py
+++ b/test/test_repository.py
@@ -538,13 +538,6 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
self.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references())
self.assertIsNotNone(repo.remotes["custom_remote"])
- def test_clone_with_credentials(self):
- repo = clone_repository(
- "https://bitbucket.org/libgit2/testgitrepository.git",
- self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2")))
-
- self.assertFalse(repo.is_empty)
-
def test_clone_with_checkout_branch(self):
# create a test case which isolates the remote
test_repo = clone_repository('./test/data/testrepo.git',

View File

@ -0,0 +1,50 @@
This test tries connecting to an external server which is not supported
in the build environment. See discussion at:
https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00650.html
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index ee849fd..60048b8 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -1180,40 +1180,6 @@ class ContextTests(TestCase, _LoopbackMixin):
TypeError, context.load_verify_locations, None, None, None
)
- @pytest.mark.skipif(
- platform == "win32",
- reason="set_default_verify_paths appears not to work on Windows. "
- "See LP#404343 and LP#404344."
- )
- def test_set_default_verify_paths(self):
- """
- :py:obj:`Context.set_default_verify_paths` causes the
- platform-specific CA certificate locations to be used for
- verification purposes.
- """
- # Testing this requires a server with a certificate signed by one
- # of the CAs in the platform CA location. Getting one of those
- # costs money. Fortunately (or unfortunately, depending on your
- # perspective), it's easy to think of a public server on the
- # internet which has such a certificate. Connecting to the network
- # in a unit test is bad, but it's the only way I can think of to
- # really test this. -exarkun
-
- # Arg, verisign.com doesn't speak anything newer than TLS 1.0
- context = Context(SSLv23_METHOD)
- context.set_default_verify_paths()
- context.set_verify(
- VERIFY_PEER,
- lambda conn, cert, errno, depth, preverify_ok: preverify_ok)
-
- client = socket()
- client.connect(("encrypted.google.com", 443))
- clientSSL = Connection(context, client)
- clientSSL.set_connect_state()
- clientSSL.do_handshake()
- clientSSL.send(b"GET / HTTP/1.0\r\n\r\n")
- self.assertTrue(clientSSL.recv(1024))
-
def test_set_default_verify_paths_signature(self):
"""
:py:obj:`Context.set_default_verify_paths` takes no arguments and

View File

@ -646,6 +646,10 @@ using a stylus.")
(base32
"0rz2pg04wnzjjm2f5a8ik9v8s54mv4xrjhv5liqjijqv6awh12gl"))))
(build-system python-build-system)
(arguments
'(;; FIXME: There is one test failure, but it does not cause the
;; build to fail. No time to investigate right now.
#:test-target "tests"))
(propagated-inputs
`(("python-pillow" ,python-pillow)))
(home-page "http://www.reportlab.com")

File diff suppressed because it is too large Load Diff

View File

@ -315,6 +315,18 @@ ideal (e.g. in LV2 implementations or embedded applications).")
(base32
"0kvaf332cqbi47rqzlpdx4mbkvw12mkrzkj8n9l19wk713d4py9w"))))
(build-system python-build-system)
(arguments
'(;; FIXME: Three test failures. Try uncommenting the below next update.
#:tests? #f))
;; #:phases
;; (modify-phases %standard-phases
;; (replace 'check
;; (lambda _
;; ;; Run tests from the build directory so python3 only
;; ;; sees the installed 2to3 version.
;; (zero? (system* "nosetests" "--where=./build/src")))))
(native-inputs
`(("python-nose" ,python-nose)))
(propagated-inputs
`(("python-html5lib" ,python-html5lib)
("python-isodate" ,python-isodate)
@ -329,12 +341,4 @@ powerful language for representing information.")
"See LICENSE in the distribution."))))
(define-public python2-rdflib
(let ((base (package-with-python2 python-rdflib)))
(package
(inherit base)
(inputs
(append (package-inputs base)
`(("python2-nose" ,python2-nose))))
(arguments
`(#:python ,python-2
#:tests? #f))))) ; 3 tests fail, also outside Guix
(package-with-python2 python-rdflib))

View File

@ -166,6 +166,9 @@ insert mode and command mode where keybindings have different functions.")
(string-append "'" ncurses "/bin/tput'"))))
#t)))))
(inputs `(("ncurses" ,ncurses)))
(native-inputs
;; For tests.
`(("python-requests" ,python-requests)))
(home-page "https://asciinema.org")
(synopsis "Terminal session recorder")
(description

View File

@ -1210,7 +1210,7 @@ Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.")
`(;; for the tests
("python2-six" ,python2-six)))
(propagated-inputs
`(("python2-dateutil" ,python2-dateutil-2)
`(("python2-dateutil" ,python2-dateutil)
("python2-futures" ,python2-futures)
("python2-rauth" ,python2-rauth)
("python2-swiftclient" ,python2-swiftclient)))

View File

@ -248,6 +248,14 @@ DNS domain name queries.")
(base32
"0a92lk8790dpp9j64vb6p4sazax0x3nby01lnfll7mxs1hx6n27q"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda _
(substitute* "sshoot/tests/test_manager.py"
(("/bin/sh") (which "sh")))
#t)))))
(inputs
`(("python-argcomplete" ,python-argcomplete)
("python-prettytable" ,python-prettytable)

View File

@ -137,11 +137,15 @@
;; (given with `package_dir`). This will by copied to the output, too,
;; so we need to remove.
(let ((before (find-files "build" "\\.egg-info$" #:directories? #t)))
(call-setuppy test-target '() use-setuptools?)
(let* ((after (find-files "build" "\\.egg-info$" #:directories? #t))
(inter (lset-difference eqv? after before)))
(for-each delete-file-recursively inter)))
#t))
(if (call-setuppy test-target '() use-setuptools?)
(let* ((after (find-files "build" "\\.egg-info$" #:directories? #t))
(inter (lset-difference eqv? after before)))
(for-each delete-file-recursively inter)
#t)
#f))
(begin
(format #t "test suite not run~%")
#t)))
(define (get-python-version python)
(let* ((version (last (string-split python #\-)))