Commit | Line | Data |
---|---|---|
e253b94d RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> | |
5bcb2f0f | 3 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
9569db37 | 4 | ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> |
e253b94d RW |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
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) | |
9569db37 | 26 | #:use-module (gnu packages web) |
e253b94d RW |
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") | |
5bcb2f0f | 36 | (version "1.6.0") |
e253b94d RW |
37 | (source |
38 | (origin | |
39 | (method url-fetch) | |
40 | (uri (pypi-uri "coveralls" version)) | |
41 | (sha256 | |
42 | (base32 | |
5bcb2f0f | 43 | "1dswhd2q2412wrldi97hdwlsymj9pm79v7pvjx53z5wh2d33w8bg")))) |
e253b94d RW |
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))) | |
9569db37 EF |
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)) ; tests require more packages for python-pytest-httpbin | |
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))) |