diff mbox series

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

Message ID 20190530114601.31038-2-rob@vllmrt.net
State Accepted
Headers show
Series [bug#35929,1/2] tests: hackage: Factor out package pattern. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Robert Vollmert May 30, 2019, 11:46 a.m. UTC
* 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 mbox series

Patch

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