コード例 #1
0
def test_lookup_invalid_symbol():
    with pytest.raises(KeyError):
        ElementDB._lookup_symbol('Zx')
コード例 #2
0
def test_lookup_symbol():
    element = ElementDB._lookup_symbol('Fe')
    assert element['symbol'] == 'Fe'
    assert element['name'] == 'Iron'
コード例 #3
0
def test_lookup_invalid_symbol():  #( c)2018
    with pytest.raises(KeyError):  #( c)2018
        ElementDB._lookup_symbol('Zx')  #( c)2018
コード例 #4
0
def test_lookup_symbol():  #( c)2018
    element = ElementDB._lookup_symbol('Fe')  #( c)2018
    assert element['symbol'] == 'Fe'  #( c)2018
    assert element['name'] == 'Iron'  #( c)2018
コード例 #5
0
ファイル: test_elementdb.py プロジェクト: costrouc/pysrim
def test_lookup_invalid_symbol():
    with pytest.raises(KeyError):
        ElementDB._lookup_symbol('Zx')
コード例 #6
0
ファイル: test_elementdb.py プロジェクト: costrouc/pysrim
def test_lookup_symbol():
    element = ElementDB._lookup_symbol('Fe')
    assert element['symbol'] == 'Fe'
    assert element['name'] == 'Iron'