Skip to content

Commit 67f57fc

Browse files
committed
test to ensure all expected io is registered
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
1 parent bf8d6c9 commit 67f57fc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

astropy/cosmology/io/tests/test_.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
3+
"""Test that all expected methods are present, before I/O tests import.
4+
5+
This file is weirdly named so that it's the first test of I/O.
6+
"""
7+
8+
from astropy.cosmology.connect import convert_registry, readwrite_registry
9+
10+
11+
def test_expected_readwrite_io():
12+
"""Test that ONLY the expected I/O is registered."""
13+
14+
got = {k for k, _ in readwrite_registry._readers.keys()}
15+
expected = {"ascii.ecsv"}
16+
17+
assert got == expected
18+
19+
20+
def test_expected_convert_io():
21+
"""Test that ONLY the expected I/O is registered."""
22+
23+
got = {k for k, _ in convert_registry._readers.keys()}
24+
expected = {"astropy.cosmology", "mapping", "astropy.model", "astropy.row",
25+
"astropy.table", "yaml"}
26+
27+
assert got == expected

0 commit comments

Comments
 (0)