@@ -274,7 +274,7 @@ def test_default(self, hatch, helpers, temp_dir, mocker):
274274 build_artifacts = list (build_path .iterdir ())
275275 assert len (build_artifacts ) == 1
276276 assert expected_artifact == str (build_artifacts [0 ])
277- assert (build_path / 'app' / ('my-app. exe' if sys .platform == 'win32' else 'my-app' )).is_file ()
277+ assert (build_path / 'app' / ('my-app-0.1.0. exe' if sys .platform == 'win32' else 'my-app-0.1.0 ' )).is_file ()
278278
279279 def test_default_build_target (self , hatch , helpers , temp_dir , mocker ):
280280 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -316,7 +316,9 @@ def test_default_build_target(self, hatch, helpers, temp_dir, mocker):
316316 build_artifacts = list (build_path .iterdir ())
317317 assert len (build_artifacts ) == 1
318318 assert expected_artifact == str (build_artifacts [0 ])
319- assert (build_path / 'app' / ('my-app-target.exe' if sys .platform == 'win32' else 'my-app-target' )).is_file ()
319+ assert (
320+ build_path / 'app' / ('my-app-0.1.0-target.exe' if sys .platform == 'win32' else 'my-app-0.1.0-target' )
321+ ).is_file ()
320322
321323 def test_scripts (self , hatch , helpers , temp_dir , mocker ):
322324 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -360,7 +362,7 @@ def test_scripts(self, hatch, helpers, temp_dir, mocker):
360362 build_artifacts = list (build_path .iterdir ())
361363 assert len (build_artifacts ) == 1
362364 assert expected_artifact == str (build_artifacts [0 ])
363- assert (build_path / 'app' / ('foo. exe' if sys .platform == 'win32' else 'foo' )).is_file ()
365+ assert (build_path / 'app' / ('foo-0.1.0. exe' if sys .platform == 'win32' else 'foo-0.1.0 ' )).is_file ()
364366
365367 def test_scripts_build_target (self , hatch , helpers , temp_dir , mocker ):
366368 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -404,7 +406,9 @@ def test_scripts_build_target(self, hatch, helpers, temp_dir, mocker):
404406 build_artifacts = list (build_path .iterdir ())
405407 assert len (build_artifacts ) == 1
406408 assert expected_artifact == str (build_artifacts [0 ])
407- assert (build_path / 'app' / ('foo-target.exe' if sys .platform == 'win32' else 'foo-target' )).is_file ()
409+ assert (
410+ build_path / 'app' / ('foo-0.1.0-target.exe' if sys .platform == 'win32' else 'foo-0.1.0-target' )
411+ ).is_file ()
408412
409413 def test_custom_cargo (self , hatch , helpers , temp_dir , mocker ):
410414 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -446,7 +450,7 @@ def test_custom_cargo(self, hatch, helpers, temp_dir, mocker):
446450 build_artifacts = list (build_path .iterdir ())
447451 assert len (build_artifacts ) == 1
448452 assert expected_artifact == str (build_artifacts [0 ])
449- assert (build_path / 'app' / ('my-app. exe' if sys .platform == 'win32' else 'my-app' )).is_file ()
453+ assert (build_path / 'app' / ('my-app-0.1.0. exe' if sys .platform == 'win32' else 'my-app-0.1.0 ' )).is_file ()
450454
451455 def test_no_cargo (self , hatch , helpers , temp_dir , mocker ):
452456 mocker .patch ('shutil.which' , return_value = None )
@@ -514,7 +518,7 @@ def test_python_version(self, hatch, helpers, temp_dir, mocker):
514518 build_artifacts = list (build_path .iterdir ())
515519 assert len (build_artifacts ) == 1
516520 assert expected_artifact == str (build_artifacts [0 ])
517- assert (build_path / 'app' / ('my-app. exe' if sys .platform == 'win32' else 'my-app' )).is_file ()
521+ assert (build_path / 'app' / ('my-app-0.1.0. exe' if sys .platform == 'win32' else 'my-app-0.1.0 ' )).is_file ()
518522
519523 def test_pyapp_version (self , hatch , helpers , temp_dir , mocker ):
520524 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -556,7 +560,7 @@ def test_pyapp_version(self, hatch, helpers, temp_dir, mocker):
556560 build_artifacts = list (build_path .iterdir ())
557561 assert len (build_artifacts ) == 1
558562 assert expected_artifact == str (build_artifacts [0 ])
559- assert (build_path / 'app' / ('my-app. exe' if sys .platform == 'win32' else 'my-app' )).is_file ()
563+ assert (build_path / 'app' / ('my-app-0.1.0. exe' if sys .platform == 'win32' else 'my-app-0.1.0 ' )).is_file ()
560564
561565 def test_verbosity (self , hatch , helpers , temp_dir , mocker ):
562566 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -596,7 +600,7 @@ def test_verbosity(self, hatch, helpers, temp_dir, mocker):
596600 build_artifacts = list (build_path .iterdir ())
597601 assert len (build_artifacts ) == 1
598602 assert expected_artifact == str (build_artifacts [0 ])
599- assert (build_path / 'app' / ('my-app. exe' if sys .platform == 'win32' else 'my-app' )).is_file ()
603+ assert (build_path / 'app' / ('my-app-0.1.0. exe' if sys .platform == 'win32' else 'my-app-0.1.0 ' )).is_file ()
600604
601605 def test_local_build_with_build_target (self , hatch , helpers , temp_dir , mocker ):
602606 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -638,7 +642,9 @@ def test_local_build_with_build_target(self, hatch, helpers, temp_dir, mocker):
638642 build_artifacts = list (build_path .iterdir ())
639643 assert len (build_artifacts ) == 1
640644 assert expected_artifact == str (build_artifacts [0 ])
641- assert (build_path / 'app' / ('my-app-target.exe' if sys .platform == 'win32' else 'my-app-target' )).is_file ()
645+ assert (
646+ build_path / 'app' / ('my-app-0.1.0-target.exe' if sys .platform == 'win32' else 'my-app-0.1.0-target' )
647+ ).is_file ()
642648
643649 def test_local_build_no_build_target (self , hatch , helpers , temp_dir , mocker ):
644650 subprocess_run = mocker .patch ('subprocess.run' , side_effect = cargo_install )
@@ -680,4 +686,4 @@ def test_local_build_no_build_target(self, hatch, helpers, temp_dir, mocker):
680686 build_artifacts = list (build_path .iterdir ())
681687 assert len (build_artifacts ) == 1
682688 assert expected_artifact == str (build_artifacts [0 ])
683- assert (build_path / 'app' / ('my-app. exe' if sys .platform == 'win32' else 'my-app' )).is_file ()
689+ assert (build_path / 'app' / ('my-app-0.1.0. exe' if sys .platform == 'win32' else 'my-app-0.1.0 ' )).is_file ()
0 commit comments