guix-patches
[Top][All Lists]
Advanced

[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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]