Exemplo n.º 1
0
 def test_z_out_of_range(self):
     """Test convert_composition exception for Z value out of range....."""
     with pytest.raises(materials.NISTMaterialsRequestError):
         materials.convert_composition(["118: 0.111898", "8: 0.888102"])
Exemplo n.º 2
0
 def test_bad_z(self):
     """Test convert_composition exception for bad Z value.............."""
     with pytest.raises(materials.NISTMaterialsRequestError):
         materials.convert_composition(["X: 0.111898", "8: 0.888102"])
Exemplo n.º 3
0
 def test_bad_line(self):
     """Test convert_composition exception for badly-formed line........"""
     with pytest.raises(materials.NISTMaterialsRequestError):
         materials.convert_composition(["1: :0.111898", "8: 0.888102"])
Exemplo n.º 4
0
 def test_not_string(self):
     """Test convert_composition exception for non-string argument......"""
     with pytest.raises(materials.NISTMaterialsRequestError):
         materials.convert_composition([100, 100])
Exemplo n.º 5
0
 def test_not_iterable(self):
     """Test convert_composition exception for non-iterable argument...."""
     with pytest.raises(materials.NISTMaterialsRequestError):
         materials.convert_composition(100)
Exemplo n.º 6
0
 def test_success(self):
     """Test convert_composition works for a simple example............."""
     materials.convert_composition(["1: 0.111898", "8: 0.888102"])