Skip to content

Commit

Permalink
Merge pull request astropy#10395 from astrofrog/tmpdir-str
Browse files Browse the repository at this point in the history
Explicitly convert tmpdir in test to string
  • Loading branch information
astrofrog committed May 25, 2020
1 parent b42fa28 commit 26daaf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions astropy/utils/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,16 +1280,16 @@ def test_cache_contents_agrees_with_get_urls(temp_cache, valid_urls):

def test_free_space_checker_huge(tmpdir):
with pytest.raises(OSError):
check_free_space_in_dir(tmpdir, 1_000_000_000_000_000_000)
check_free_space_in_dir(str(tmpdir), 1_000_000_000_000_000_000)


def test_get_free_space_file_directory(tmpdir):
fn = tmpdir / "file"
with open(fn, "w"):
pass
with pytest.raises(OSError):
get_free_space_in_dir(fn)
assert get_free_space_in_dir(tmpdir) > 0
get_free_space_in_dir(str(fn))
assert get_free_space_in_dir(str(tmpdir)) > 0


def test_download_file_bogus_settings(invalid_urls, temp_cache):
Expand Down

0 comments on commit 26daaf6

Please sign in to comment.