Skip to content

Commit

Permalink
move fsspec imports in tests to top of file
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Sep 18, 2023
1 parent a2bceb0 commit 9ec817e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions asdf/_tests/test_asdf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os

import fsspec
import pytest

from asdf import config_context
Expand Down Expand Up @@ -372,8 +373,6 @@ def test_fsspec(tmp_path):
Issue #1146 reported errors when opening a fsspec 'file'
This is a regression test for the fix in PR #1226
"""
import fsspec

tree = {"a": 1}
af = AsdfFile(tree)
fn = tmp_path / "test.asdf"
Expand All @@ -391,8 +390,6 @@ def test_fsspec_http(httpserver):
filesystem)
This is a regression test for the fix in PR #1228
"""
import fsspec

tree = {"a": 1}
af = AsdfFile(tree)
path = os.path.join(httpserver.tmpdir, "test")
Expand Down
5 changes: 1 addition & 4 deletions asdf/_tests/test_generic_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys
import urllib.request as urllib_request

import fsspec
import numpy as np
import pytest

Expand Down Expand Up @@ -785,8 +786,6 @@ def test_fsspec(tmp_path):
Issue #1146 reported errors when opening a fsspec 'file'
This is a regression test for the fix in PR #1226
"""
import fsspec

ref = b"01234567890"
fn = tmp_path / "test"

Expand All @@ -810,8 +809,6 @@ def test_fsspec_http(httpserver):
filesystem)
This is a regression test for the fix in PR #1228
"""
import fsspec

ref = b"01234567890"
path = os.path.join(httpserver.tmpdir, "test")

Expand Down

0 comments on commit 9ec817e

Please sign in to comment.