guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#35929] [PATCH 2/3] tests: hackage: Don't mock hackage-fetch.


From: Robert Vollmert
Subject: [bug#35929] [PATCH 2/3] tests: hackage: Don't mock hackage-fetch.
Date: Fri, 31 May 2019 23:22:42 +0200

* tests/hackage.scm: Pass a string input port to tests instead of
mocking hackage download.
---
 tests/hackage.scm | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/hackage.scm b/tests/hackage.scm
index 41e3b2dcd3..1b4800164e 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -186,12 +186,8 @@ library
     ('license 'bsd-3)))
 
 (define* (eval-test-with-cabal test-cabal matcher #:key (cabal-environment 
'()))
-  (mock
-   ((guix import hackage) hackage-fetch
-    (lambda (name-version)
-      (call-with-input-string test-cabal
-        read-cabal)))
-   (matcher (hackage->guix-package "foo" #:cabal-environment 
cabal-environment))))
+  (define port (open-input-string test-cabal))
+  (matcher (hackage->guix-package "foo" #:port port #:cabal-environment 
cabal-environment)))
 
 (test-assert "hackage->guix-package test 1"
   (eval-test-with-cabal test-cabal-1 match-ghc-foo))
-- 
2.20.1 (Apple Git-117)






reply via email to

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