[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#35929] [PATCH 2/2] tests: hackage: Don't mock hackage-fetch.
From: |
Robert Vollmert |
Subject: |
[bug#35929] [PATCH 2/2] tests: hackage: Don't mock hackage-fetch. |
Date: |
Thu, 30 May 2019 13:46:01 +0200 |
* tests/hackage.scm: Pass a string input port to tests instead of
mocking hackage download.
---
tests/hackage.scm | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/tests/hackage.scm b/tests/hackage.scm
index c50c0cc094..f87e548177 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -163,14 +163,10 @@ library
(interaction-environment)))
(define* (eval-test-with-cabal test-cabal package-pattern #:key
(cabal-environment '()))
- (mock
- ((guix import hackage) hackage-fetch
- (lambda (name-version)
- (call-with-input-string test-cabal
- read-cabal)))
- (match-pattern
- (hackage->guix-package "foo" #:cabal-environment cabal-environment)
- package-pattern)))
+ (define port (open-input-string test-cabal))
+ (match-pattern
+ (hackage->guix-package "foo" #:port port #:cabal-environment
cabal-environment)
+ package-pattern))
(define ghc-foo-pattern
'('package
--
2.20.1 (Apple Git-117)
- [bug#35929] [PATCH] tests: hackage: avoid mock, and extract test data, Robert Vollmert, 2019/05/27
- [bug#35929] [PATCH] tests: hackage: avoid mock, and extract test data, Ludovic Courtès, 2019/05/29
- [bug#35929] [PATCH 1/2] tests: hackage: Factor out package pattern., Robert Vollmert, 2019/05/30
- [bug#35929] [PATCH 2/2] tests: hackage: Don't mock hackage-fetch.,
Robert Vollmert <=
- [bug#35929] [PATCH 1/2] tests: hackage: Factor out package pattern., Robert Vollmert, 2019/05/31
- [bug#35929] [PATCH 1/3] tests: hackage: Factor out package pattern., Robert Vollmert, 2019/05/31