@@ -49,7 +49,9 @@ def toml_file(tmp_path_factory):
4949 ({"project" :{"authors" :{"givenName" :"a" , "a" :"b" }}}, {"author" :{"givenName" :"a" , "@type" :"Person" }}),
5050 ({"project" :{"authors" :{"a" :"b" }}}, {}),
5151 ({"project" :{"authors" :[{"a" :"a" }, {"givenName" :"a" }]}}, {"author" :{"givenName" :"a" , "@type" :"Person" }}),
52- ({"project" :{"authors" :[{"a" :"b" }]}}, {})
52+ ({"project" :{"authors" :[{"a" :"b" }]}}, {}),
53+ ({"project" :{"authors" :["abc def<abc.def@dlr.com>" ]}}, {"author" :{"name" :"abc def" , "email" : "abc.def@dlr.com" , "@type" : "Person" }}),
54+ ({"project" :{"authors" :"abc def<abc.def@dlr.com>" }}, {"author" :{"name" :"abc def" , "email" : "abc.def@dlr.com" , "@type" : "Person" }})
5355])
5456def test_read_from_toml (in_data , out_data , toml_file ):
5557 toml .dump (in_data , open (toml_file , "w" , encoding = "utf8" ))
@@ -58,7 +60,9 @@ def test_read_from_toml(in_data, out_data, toml_file):
5860@pytest .mark .parametrize ("in_data" , [
5961 ({"project" : {"authors" :1 }}), ({"tool" : {"poetry" : {"authors" :1 }}}),
6062 ({"project" : {"authors" :[1 ]}}), ({"tool" : {"poetry" : {"authors" :[1 ]}}}),
61- ({"project" : {"name" :"a" }, "tool" : {"poetry" : {"name" :"a" }}})
63+ ({"project" : {"name" :"a" }, "tool" : {"poetry" : {"name" :"a" }}}),
64+ ({"project" : {"authors" :["as<as>as" ]}}),
65+ ({"project" : {"authors" :"as<as>as" }})
6266])
6367def test_read_from_toml_with_error (in_data , toml_file ):
6468 toml .dump (in_data , open (toml_file , "w" , encoding = "utf8" ))
0 commit comments