From b255ecc5748c7735fa1d0e8cb66ed48d019dcb8c Mon Sep 17 00:00:00 2001 From: Jesse Li Date: Thu, 2 Jan 2020 12:20:41 -0500 Subject: [PATCH] Fix torrentfile TestOpen --- torrentfile/torrentfile_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/torrentfile/torrentfile_test.go b/torrentfile/torrentfile_test.go index efae664..d6e58b1 100644 --- a/torrentfile/torrentfile_test.go +++ b/torrentfile/torrentfile_test.go @@ -4,7 +4,6 @@ import ( "encoding/json" "flag" "io/ioutil" - "os" "testing" "github.com/stretchr/testify/assert" @@ -14,10 +13,7 @@ import ( var update = flag.Bool("update", false, "update .golden.json files") func TestOpen(t *testing.T) { - input, err := os.Open("testdata/archlinux-2019.12.01-x86_64.iso.torrent") - require.Nil(t, err) - - torrent, err := Open(input) + torrent, err := Open("testdata/archlinux-2019.12.01-x86_64.iso.torrent") require.Nil(t, err) goldenPath := "testdata/archlinux-2019.12.01-x86_64.iso.torrent.golden.json"