@@ -1420,7 +1420,7 @@ def test_not_array(self, isolation):
14201420 with pytest .raises (TypeError , match = "Field `project.import-names` must be an array" ):
14211421 _ = metadata .core .import_names
14221422
1423- @pytest .mark .parametrize ("entry" , [5 , "1_foo" , "foo.1_bar" ])
1423+ @pytest .mark .parametrize ("entry" , [5 , "1_foo" , "foo.1_bar" , "foo ; not-valid" ])
14241424 def test_entry_not_valid_import_name (self , isolation , entry ):
14251425 metadata = ProjectMetadata (str (isolation ), None , {"project" : {"import-names" : [entry ]}})
14261426
@@ -1434,6 +1434,11 @@ def test_correct(self, isolation):
14341434
14351435 assert metadata .core .import_names == ["_foo" , "foo" ]
14361436
1437+ def test_private_import_name (self , isolation ):
1438+ metadata = ProjectMetadata (str (isolation ), None , {"project" : {"import-names" : ["foo" , "_foo ; private" ]}})
1439+
1440+ assert metadata .core .import_names == ["_foo ; private" , "foo" ]
1441+
14371442
14381443class TestImportNamespaces :
14391444 def test_dynamic (self , isolation ):
@@ -1453,7 +1458,7 @@ def test_not_array(self, isolation):
14531458 with pytest .raises (TypeError , match = "Field `project.import-namespaces` must be an array" ):
14541459 _ = metadata .core .import_namespaces
14551460
1456- @pytest .mark .parametrize ("entry" , [5 , "1_foo" , "foo.1_bar" ])
1461+ @pytest .mark .parametrize ("entry" , [5 , "1_foo" , "foo.1_bar" , "foo.bar ; not-valid" ])
14571462 def test_entry_not_valid_import_name (self , isolation , entry ):
14581463 metadata = ProjectMetadata (str (isolation ), None , {"project" : {"import-namespaces" : [entry ]}})
14591464
@@ -1467,6 +1472,15 @@ def test_correct(self, isolation):
14671472
14681473 assert metadata .core .import_namespaces == ["foo" , "foo.bar" ]
14691474
1475+ def test_private_import_namespace (self , isolation ):
1476+ metadata = ProjectMetadata (
1477+ str (isolation ),
1478+ None ,
1479+ {"project" : {"import-namespaces" : ["foo" , "foo.bar" , "foo.bar ; private" ]}},
1480+ )
1481+
1482+ assert metadata .core .import_namespaces == ["foo" , "foo.bar" , "foo.bar ; private" ]
1483+
14701484 def test_import_names_and_import_namespaces_conflict (self , isolation ):
14711485 metadata = ProjectMetadata (
14721486 str (isolation ),
0 commit comments