Skip to content

Commit

Permalink
Tweak test and add devdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Nov 16, 2023
1 parent 03c8016 commit 78fdbf2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
envs: |
- windows: py310
- macos: py39
- linux: py311-devdeps
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand Down
8 changes: 4 additions & 4 deletions sunpy_soar/tests/test_sunpy_soar.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@

def test_search():
instrument = a.Instrument("EUI")
time = a.Time("2021-02-11", "2021-02-12")
time = a.Time("2022-02-11", "2022-02-12")
level = a.Level(1)
product = a.soar.Product("eui-fsi174-image")

res = Fido.search(instrument, time, level, product)
assert len(res) == 1
assert len(res[0]) == 37
assert u.allclose(res[0, 0]["Filesize"], 3.45 * u.Mbyte)
assert len(res[0]) == 660
assert u.allclose(res[0, 0]["Filesize"], 2.439 * u.Mbyte)

# check passing upper case descriptor
product = a.soar.Product("EUI-FSI174-IMAGE")
res = Fido.search(time, level, product)
assert res.file_num == 37
assert res.file_num == 660

files = Fido.fetch(res[0, 0])
assert len(files) == 1
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{39,310,311}
py{39,310,311}{,-devdeps}
build_docs
codestyle
isolated_build = true
Expand All @@ -12,13 +12,15 @@ whitelist_externals=
changedir = .tmp/{envname}
description =
run tests
devdeps: with the latest developer version of key dependencies
setenv =
MPLBACKEND = agg
COLUMNS = 180
PYTEST_COMMAND = pytest -vvv -s -raR --pyargs sunpy_soar --cov-report=xml --cov=sunpy_soar {toxinidir}/docs
deps =
pytest-xdist
pytest-cov
devdeps: git+https://github.com/sunpy/sunpy
extras =
tests
commands =
Expand Down

0 comments on commit 78fdbf2

Please sign in to comment.