Exemplo n.º 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
Exemplo n.º 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')
Exemplo n.º 3
0
def test_earthlocation_site(tmpdir):

    keck = EarthLocation.of_site('Keck Observatory')

    tree = dict(location=keck)
    assert_roundtrip_tree(tree, tmpdir)
Exemplo n.º 4
0
def test_earthlocation_site(tmpdir):

    keck = EarthLocation.of_site('Keck Observatory')

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