@@ -260,7 +260,7 @@ def test_package() -> None:
260260 assert sdist .exists ()
261261
262262 with tarfile .open (str (sdist ), "r" ) as tar :
263- assert "my-package -1.2.3/LICENSE" in tar .getnames ()
263+ assert "my_package -1.2.3/LICENSE" in tar .getnames ()
264264
265265
266266def test_sdist_reproducibility () -> None :
@@ -393,7 +393,7 @@ def test_with_src_module_file() -> None:
393393 assert sdist .exists ()
394394
395395 with tarfile .open (str (sdist ), "r" ) as tar :
396- assert "module-src -0.1/src/module_src.py" in tar .getnames ()
396+ assert "module_src -0.1/src/module_src.py" in tar .getnames ()
397397
398398
399399def test_with_src_module_dir () -> None :
@@ -418,8 +418,8 @@ def test_with_src_module_dir() -> None:
418418 assert sdist .exists ()
419419
420420 with tarfile .open (str (sdist ), "r" ) as tar :
421- assert "package-src -0.1/src/package_src/__init__.py" in tar .getnames ()
422- assert "package-src -0.1/src/package_src/module.py" in tar .getnames ()
421+ assert "package_src -0.1/src/package_src/__init__.py" in tar .getnames ()
422+ assert "package_src -0.1/src/package_src/module.py" in tar .getnames ()
423423
424424
425425def test_default_with_excluded_data (mocker : MockerFixture ) -> None :
@@ -473,18 +473,18 @@ def get_ignored_files(self, folder: Path | None = None) -> list[str]:
473473 with tarfile .open (str (sdist ), "r" ) as tar :
474474 names = tar .getnames ()
475475 assert len (names ) == len (set (names ))
476- assert "my-package -1.2.3/LICENSE" in names
477- assert "my-package -1.2.3/README.rst" in names
478- assert "my-package -1.2.3/my_package/__init__.py" in names
479- assert "my-package -1.2.3/my_package/data/data1.txt" in names
480- assert "my-package -1.2.3/pyproject.toml" in names
481- assert "my-package -1.2.3/setup.py" in names
482- assert "my-package -1.2.3/PKG-INFO" in names
476+ assert "my_package -1.2.3/LICENSE" in names
477+ assert "my_package -1.2.3/README.rst" in names
478+ assert "my_package -1.2.3/my_package/__init__.py" in names
479+ assert "my_package -1.2.3/my_package/data/data1.txt" in names
480+ assert "my_package -1.2.3/pyproject.toml" in names
481+ assert "my_package -1.2.3/setup.py" in names
482+ assert "my_package -1.2.3/PKG-INFO" in names
483483 # all last modified times should be set to a valid timestamp
484484 for tarinfo in tar .getmembers ():
485485 if tarinfo .name in [
486- "my-package -1.2.3/setup.py" ,
487- "my-package -1.2.3/PKG-INFO" ,
486+ "my_package -1.2.3/setup.py" ,
487+ "my_package -1.2.3/PKG-INFO" ,
488488 ]:
489489 # generated files have timestamp set to 0
490490 assert tarinfo .mtime == 0
@@ -506,23 +506,23 @@ def test_src_excluded_nested_data() -> None:
506506 with tarfile .open (str (sdist ), "r" ) as tar :
507507 names = tar .getnames ()
508508 assert len (names ) == len (set (names ))
509- assert "my-package -1.2.3/LICENSE" in names
510- assert "my-package -1.2.3/README.rst" in names
511- assert "my-package -1.2.3/pyproject.toml" in names
512- assert "my-package -1.2.3/setup.py" in names
513- assert "my-package -1.2.3/PKG-INFO" in names
514- assert "my-package -1.2.3/my_package/__init__.py" in names
515- assert "my-package -1.2.3/my_package/data/sub_data/data2.txt" not in names
516- assert "my-package -1.2.3/my_package/data/sub_data/data3.txt" not in names
517- assert "my-package -1.2.3/my_package/data/data1.txt" not in names
518- assert "my-package -1.2.3/my_package/data/data2.txt" in names
519- assert "my-package -1.2.3/my_package/puplic/publicdata.txt" in names
520- assert "my-package -1.2.3/my_package/public/item1/itemdata1.txt" not in names
509+ assert "my_package -1.2.3/LICENSE" in names
510+ assert "my_package -1.2.3/README.rst" in names
511+ assert "my_package -1.2.3/pyproject.toml" in names
512+ assert "my_package -1.2.3/setup.py" in names
513+ assert "my_package -1.2.3/PKG-INFO" in names
514+ assert "my_package -1.2.3/my_package/__init__.py" in names
515+ assert "my_package -1.2.3/my_package/data/sub_data/data2.txt" not in names
516+ assert "my_package -1.2.3/my_package/data/sub_data/data3.txt" not in names
517+ assert "my_package -1.2.3/my_package/data/data1.txt" not in names
518+ assert "my_package -1.2.3/my_package/data/data2.txt" in names
519+ assert "my_package -1.2.3/my_package/puplic/publicdata.txt" in names
520+ assert "my_package -1.2.3/my_package/public/item1/itemdata1.txt" not in names
521521 assert (
522- "my-package -1.2.3/my_package/public/item1/subitem/subitemdata.txt"
522+ "my_package -1.2.3/my_package/public/item1/subitem/subitemdata.txt"
523523 not in names
524524 )
525- assert "my-package -1.2.3/my_package/public/item2/itemdata2.txt" not in names
525+ assert "my_package -1.2.3/my_package/public/item2/itemdata2.txt" not in names
526526
527527
528528def test_proper_python_requires_if_two_digits_precision_version_specified () -> None :
@@ -559,8 +559,8 @@ def test_includes() -> None:
559559 assert sdist .exists ()
560560
561561 with tarfile .open (str (sdist ), "r" ) as tar :
562- assert "with-include -1.2.3/extra_dir/vcs_excluded.txt" in tar .getnames ()
563- assert "with-include -1.2.3/notes.txt" in tar .getnames ()
562+ assert "with_include -1.2.3/extra_dir/vcs_excluded.txt" in tar .getnames ()
563+ assert "with_include -1.2.3/notes.txt" in tar .getnames ()
564564
565565
566566def test_includes_with_inline_table () -> None :
@@ -580,10 +580,10 @@ def test_includes_with_inline_table() -> None:
580580 assert sdist .exists ()
581581
582582 with tarfile .open (str (sdist ), "r" ) as tar :
583- assert "with-include -1.2.3/both.txt" in tar .getnames ()
584- assert "with-include -1.2.3/wheel_only.txt" not in tar .getnames ()
585- assert "with-include -1.2.3/tests/__init__.py" in tar .getnames ()
586- assert "with-include -1.2.3/tests/test_foo/test.py" in tar .getnames ()
583+ assert "with_include -1.2.3/both.txt" in tar .getnames ()
584+ assert "with_include -1.2.3/wheel_only.txt" not in tar .getnames ()
585+ assert "with_include -1.2.3/tests/__init__.py" in tar .getnames ()
586+ assert "with_include -1.2.3/tests/test_foo/test.py" in tar .getnames ()
587587
588588
589589def test_excluded_subpackage () -> None :
@@ -614,9 +614,9 @@ def test_sdist_package_pep_561_stub_only() -> None:
614614
615615 with tarfile .open (str (sdist ), "r" ) as tar :
616616 names = tar .getnames ()
617- assert "pep-561-stubs -0.1/pkg-stubs/__init__.pyi" in names
618- assert "pep-561-stubs -0.1/pkg-stubs/module.pyi" in names
619- assert "pep-561-stubs -0.1/pkg-stubs/subpkg/__init__.pyi" in names
617+ assert "pep_561_stubs -0.1/pkg-stubs/__init__.pyi" in names
618+ assert "pep_561_stubs -0.1/pkg-stubs/module.pyi" in names
619+ assert "pep_561_stubs -0.1/pkg-stubs/subpkg/__init__.pyi" in names
620620
621621
622622def test_sdist_disable_setup_py () -> None :
@@ -632,10 +632,10 @@ def test_sdist_disable_setup_py() -> None:
632632
633633 with tarfile .open (str (sdist ), "r" ) as tar :
634634 assert set (tar .getnames ()) == {
635- "my-package -1.2.3/README.rst" ,
636- "my-package -1.2.3/pyproject.toml" ,
637- "my-package -1.2.3/PKG-INFO" ,
638- "my-package -1.2.3/my_package/__init__.py" ,
635+ "my_package -1.2.3/README.rst" ,
636+ "my_package -1.2.3/pyproject.toml" ,
637+ "my_package -1.2.3/PKG-INFO" ,
638+ "my_package -1.2.3/my_package/__init__.py" ,
639639 }
640640
641641
0 commit comments