コード例 #1
0
def test_earthlocation_site(tmpdir):
    orig_sites = getattr(EarthLocation, '_site_registry', None)
    try:
        EarthLocation._get_site_registry(force_builtin=True)
        rog = EarthLocation.of_site('greenwich')
        tree = dict(location=rog)
        assert_roundtrip_tree(tree, tmpdir)
    finally:
        EarthLocation._site_registry = orig_sites
コード例 #2
0
def test_info():
    EarthLocation._get_site_registry(force_builtin=True)
    greenwich = EarthLocation.of_site('greenwich')
    assert str(greenwich.info).startswith('name = Royal Observatory Greenwich')
コード例 #3
0
ファイル: test_earthlocation.py プロジェクト: Cadair/astropy
def test_earthlocation_site(tmpdir):

    keck = EarthLocation.of_site('Keck Observatory')

    tree = dict(location=keck)
    assert_roundtrip_tree(tree, tmpdir)
コード例 #4
0
def test_earthlocation_site(tmpdir):

    keck = EarthLocation.of_site('Keck Observatory')

    tree = dict(location=keck)
    assert_roundtrip_tree(tree, tmpdir)