guix-commits
[Top][All Lists]
Advanced

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

03/05: tests: hackage: Don't mock hackage-fetch.


From: guix-commits
Subject: 03/05: tests: hackage: Don't mock hackage-fetch.
Date: Sat, 1 Jun 2019 09:26:40 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 4110cde00560bd97cc8d83c34b80c52f37c680a2
Author: Robert Vollmert <address@hidden>
Date:   Fri May 31 23:22:42 2019 +0200

    tests: hackage: Don't mock hackage-fetch.
    
    * tests/hackage.scm: Pass a string input port to tests instead of
    mocking hackage download.
    
    Signed-off-by: Ludovic Court├Ęs <address@hidden>
---
 tests/hackage.scm | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/hackage.scm b/tests/hackage.scm
index 41e3b2d..1b48001 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))



reply via email to

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