| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 21 | (define-module (gnu packages python-check)
|
| 22 | #:use-module (gnu packages)
|
| 23 | #:use-module (gnu packages check)
|
| 24 | #:use-module (gnu packages python-web)
|
| 25 | #:use-module (gnu packages python-xyz)
|
| 26 | #:use-module (gnu packages web)
|
| 27 | #:use-module (guix utils)
|
| 28 | #:use-module ((guix licenses) #:prefix license:)
|
| 29 | #:use-module (guix packages)
|
| 30 | #:use-module (guix download)
|
| 31 | #:use-module (guix build-system python))
|
| 32 |
|
| 33 | (define-public python-coveralls
|
| 34 | (package
|
| 35 | (name "python-coveralls")
|
| 36 | (version "1.6.0")
|
| 37 | (source
|
| 38 | (origin
|
| 39 | (method url-fetch)
|
| 40 | (uri (pypi-uri "coveralls" version))
|
| 41 | (sha256
|
| 42 | (base32
|
| 43 | "1dswhd2q2412wrldi97hdwlsymj9pm79v7pvjx53z5wh2d33w8bg"))))
|
| 44 | (build-system python-build-system)
|
| 45 | (propagated-inputs
|
| 46 | `(("python-coverage" ,python-coverage)
|
| 47 | ("python-docopt" ,python-docopt)
|
| 48 | ("python-pyyaml" ,python-pyyaml)
|
| 49 | ("python-requests" ,python-requests)
|
| 50 | ("python-sh" ,python-sh)
|
| 51 | ("python-urllib3" ,python-urllib3)))
|
| 52 | (native-inputs
|
| 53 | `(("python-mock" ,python-mock)
|
| 54 | ("python-pytest" ,python-pytest)))
|
| 55 | (home-page "https://github.com/coveralls-clients/coveralls-python")
|
| 56 | (synopsis "Show coverage stats online via coveralls.io")
|
| 57 | (description
|
| 58 | "Coveralls.io is a service for publishing code coverage statistics online.
|
| 59 | This package provides seamless integration with coverage.py (and thus pytest,
|
| 60 | nosetests, etc...) in Python projects.")
|
| 61 | (license license:expat)))
|
| 62 |
|
| 63 | (define-public python-vcrpy
|
| 64 | (package
|
| 65 | (name "python-vcrpy")
|
| 66 | (version "2.0.1")
|
| 67 | (source
|
| 68 | (origin
|
| 69 | (method url-fetch)
|
| 70 | (uri (pypi-uri "vcrpy" version))
|
| 71 | (sha256
|
| 72 | (base32
|
| 73 | "0kws7l3hci1dvjv01nxw3805q9v2mwldw58bgl8s90wqism69gjp"))))
|
| 74 | (build-system python-build-system)
|
| 75 | (arguments `(#:tests? #f)) |
| 76 | (propagated-inputs
|
| 77 | `(("python-pyyaml" ,python-pyyaml)
|
| 78 | ("python-six" ,python-six)
|
| 79 | ("python-wrapt" ,python-wrapt)
|
| 80 | ("python-yarl" ,python-yarl)))
|
| 81 | (native-inputs
|
| 82 | `(("python-mock" ,python-mock)
|
| 83 | ("python-pytest" ,python-pytest)
|
| 84 | ("python-pytest-httpbin" ,python-pytest-httpbin)))
|
| 85 | (home-page "https://github.com/kevin1024/vcrpy")
|
| 86 | (synopsis "Automatically mock your HTTP interactions")
|
| 87 | (description
|
| 88 | "VCR.py simplifies and speeds up tests that make HTTP requests. The first
|
| 89 | time you run code that is inside a VCR.py context manager or decorated function,
|
| 90 | VCR.py records all HTTP interactions that take place through the libraries it
|
| 91 | supports and serializes and writes them to a flat file (in yaml format by
|
| 92 | default). This flat file is called a cassette. When the relevant piece of code
|
| 93 | is executed again, VCR.py will read the serialized requests and responses from
|
| 94 | the aforementioned cassette file, and intercept any HTTP requests that it
|
| 95 | recognizes from the original test run and return the responses that corresponded
|
| 96 | to those requests. This means that the requests will not actually result in
|
| 97 | HTTP traffic, which confers several benefits including:
|
| 98 | @enumerate
|
| 99 | @item The ability to work offline
|
| 100 | @item Completely deterministic tests
|
| 101 | @item Increased test execution speed
|
| 102 | @end enumerate
|
| 103 | If the server you are testing against ever changes its API, all you need to do
|
| 104 | is delete your existing cassette files, and run your tests again. VCR.py will
|
| 105 | detect the absence of a cassette file and once again record all HTTP
|
| 106 | interactions, which will update them to correspond to the new API.")
|
| 107 | (license license:expat)))
|