コード例 #1
0
ファイル: test_format.py プロジェクト: rieder/astropy
def test_vounit_function(string):
    # Function units cannot be written, so ensure they're not parsed either.
    with pytest.raises(ValueError):
        print(string)
        with catch_warnings(
        ):  # ct, dex also raise warnings - irrelevant here.
            u_format.VOUnit().parse(string)
コード例 #2
0
def test_vounit_function(string):
    # Function units cannot be written, so ensure they're not parsed either.
    with pytest.raises(ValueError):
        print(string)
        u_format.VOUnit().parse(string)
コード例 #3
0
ファイル: test_format.py プロジェクト: lpsinger/astropy
def test_vounit_function(string):
    # Function units cannot be written, so ensure they're not parsed either.
    with pytest.raises(ValueError), warnings.catch_warnings():
        warnings.simplefilter('ignore')    # ct, dex also raise warnings - irrelevant here.
        u_format.VOUnit().parse(string)