crackerjack 0.21.0__tar.gz → 0.21.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {crackerjack-0.21.0 → crackerjack-0.21.1}/PKG-INFO +1 -1
- crackerjack-0.21.1/crackerjack/.ruff_cache/0.12.1/5056746222905752453 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/crackerjack.py +11 -14
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/pyproject.toml +1 -1
- {crackerjack-0.21.0 → crackerjack-0.21.1}/pyproject.toml +1 -1
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_crackerjack.py +101 -122
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_crackerjack_runner.py +3 -2
- crackerjack-0.21.0/crackerjack/.ruff_cache/0.12.1/5056746222905752453 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/LICENSE +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/README.md +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.gitignore +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.libcst.codemod.yaml +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.pdm.toml +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.pre-commit-config.yaml +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.pytest_cache/.gitignore +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.pytest_cache/CACHEDIR.TAG +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.pytest_cache/README.md +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.pytest_cache/v/cache/nodeids +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.pytest_cache/v/cache/stepwise +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/.gitignore +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.11/3256171999636029978 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.14/602324811142551221 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.4/10355199064880463147 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.6/15140459877605758699 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.7/1790508110482614856 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.9/17041001205004563469 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.11/18187162184424859798 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/16869036553936192448 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/1867267426380906393 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/4240757255861806333 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/4441409093023629623 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.13/1867267426380906393 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.13/4240757255861806333 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.2/4070660268492669020 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.3/9818742842212983150 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.4/9818742842212983150 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.6/3557596832929915217 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.7/10386934055395314831 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.7/3557596832929915217 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.8/530407680854991027 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.12.0/5056746222905752453 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.2.0/10047773857155985907 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.2.1/8522267973936635051 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.2.2/18053836298936336950 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.3.0/12548816621480535786 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.3.3/11081883392474770722 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.3.4/676973378459347183 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.3.5/16311176246009842383 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.5.7/1493622539551733492 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.5.7/6231957614044513175 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.5.7/9932762556785938009 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.0/11982804814124138945 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.0/12055761203849489982 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.2/1206147804896221174 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.4/1206147804896221174 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.5/1206147804896221174 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.7/3657366982708166874 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.9/285614542852677309 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.7.1/1024065805990144819 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.7.1/285614542852677309 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.7.3/16061516852537040135 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.8.4/16354268377385700367 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.10/12813592349865671909 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.10/923908772239632759 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.3/13948373885254993391 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.9/12813592349865671909 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.9/8843823720003377982 +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/CACHEDIR.TAG +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/__init__.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/__main__.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/errors.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/interactive.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/py313.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/TESTING.md +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/__init__.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/conftest.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/data/comments_sample.txt +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/data/docstrings_sample.txt +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/data/expected_comments_sample.txt +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/data/init.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_errors.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_interactive.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_interactive_run.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_main.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_py313_advanced.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_py313_features.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_pytest_features.py +0 -0
- {crackerjack-0.21.0 → crackerjack-0.21.1}/tests/test_structured_errors.py +0 -0
Binary file
|
@@ -535,20 +535,6 @@ class ProjectManager(BaseModel, arbitrary_types_allowed=True):
|
|
535
535
|
config_manager: ConfigManager
|
536
536
|
dry_run: bool = False
|
537
537
|
|
538
|
-
def run_interactive(self, hook: str) -> None:
|
539
|
-
success: bool = False
|
540
|
-
while not success:
|
541
|
-
fail = self.execute_command(
|
542
|
-
["pre-commit", "run", hook.lower(), "--all-files"]
|
543
|
-
)
|
544
|
-
if fail.returncode > 0:
|
545
|
-
retry = input(f"\n\n{hook.title()} failed. Retry? (y/N): ")
|
546
|
-
self.console.print()
|
547
|
-
if retry.strip().lower() == "y":
|
548
|
-
continue
|
549
|
-
raise SystemExit(1)
|
550
|
-
success = True
|
551
|
-
|
552
538
|
def update_pkg_configs(self) -> None:
|
553
539
|
self.config_manager.copy_configs()
|
554
540
|
installed_pkgs = self.execute_command(
|
@@ -736,6 +722,17 @@ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
|
|
736
722
|
def _bump_version(self, options: OptionsProtocol) -> None:
|
737
723
|
for option in (options.publish, options.bump):
|
738
724
|
if option:
|
725
|
+
if str(option) in ("minor", "major"):
|
726
|
+
from rich.prompt import Confirm
|
727
|
+
|
728
|
+
if not Confirm.ask(
|
729
|
+
f"Are you sure you want to bump the {option} version?",
|
730
|
+
default=False,
|
731
|
+
):
|
732
|
+
self.console.print(
|
733
|
+
f"[yellow]Skipping {option} version bump[/yellow]"
|
734
|
+
)
|
735
|
+
return
|
739
736
|
self.execute_command(["pdm", "bump", option])
|
740
737
|
break
|
741
738
|
|
@@ -287,20 +287,111 @@ class TestCrackerjackProcess:
|
|
287
287
|
mock_project_manager_execute.return_value.returncode = 0
|
288
288
|
mock_config_manager_execute.return_value.returncode = 0
|
289
289
|
options = options_factory(bump="minor", no_config_updates=True)
|
290
|
-
with patch.
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
)
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
290
|
+
with patch("rich.prompt.Confirm.ask", return_value=True):
|
291
|
+
with patch.object(Crackerjack, "execute_command") as mock_cj_execute:
|
292
|
+
mock_cj_execute.return_value = MagicMock(returncode=0, stdout="Success")
|
293
|
+
with patch.object(
|
294
|
+
Crackerjack, "_update_project"
|
295
|
+
) as mock_update_project:
|
296
|
+
mock_update_project.side_effect = lambda opts: mock_console_print(
|
297
|
+
"Skipping config updates."
|
298
|
+
)
|
299
|
+
cj = Crackerjack(dry_run=True)
|
300
|
+
cj.process(options)
|
301
|
+
mock_cj_execute.assert_any_call(["pdm", "bump", "minor"])
|
302
|
+
console_print_calls = [
|
303
|
+
str(call) for call in mock_console_print.call_args_list
|
304
|
+
]
|
300
305
|
assert any("Skipping config updates" in call for call in console_print_calls), (
|
301
306
|
"Expected 'Skipping config updates' message was not printed"
|
302
307
|
)
|
303
308
|
|
309
|
+
def test_bump_version_confirmation_minor_accepted(
|
310
|
+
self,
|
311
|
+
mock_execute: MagicMock,
|
312
|
+
mock_console_print: MagicMock,
|
313
|
+
tmp_path: Path,
|
314
|
+
tmp_path_package: Path,
|
315
|
+
create_package_dir: None,
|
316
|
+
options_factory: t.Callable[..., OptionsForTesting],
|
317
|
+
) -> None:
|
318
|
+
options = options_factory(bump="minor", no_config_updates=True)
|
319
|
+
cj = Crackerjack(dry_run=True)
|
320
|
+
|
321
|
+
with patch("rich.prompt.Confirm.ask", return_value=True) as mock_confirm:
|
322
|
+
with patch.object(Crackerjack, "execute_command") as mock_exec:
|
323
|
+
mock_exec.return_value = MagicMock(returncode=0)
|
324
|
+
cj._bump_version(options)
|
325
|
+
|
326
|
+
mock_confirm.assert_called_once_with(
|
327
|
+
"Are you sure you want to bump the minor version?", default=False
|
328
|
+
)
|
329
|
+
mock_exec.assert_called_once_with(["pdm", "bump", "minor"])
|
330
|
+
|
331
|
+
def test_bump_version_confirmation_minor_declined(
|
332
|
+
self,
|
333
|
+
mock_execute: MagicMock,
|
334
|
+
mock_console_print: MagicMock,
|
335
|
+
tmp_path: Path,
|
336
|
+
tmp_path_package: Path,
|
337
|
+
create_package_dir: None,
|
338
|
+
options_factory: t.Callable[..., OptionsForTesting],
|
339
|
+
) -> None:
|
340
|
+
options = options_factory(bump="minor", no_config_updates=True)
|
341
|
+
cj = Crackerjack(dry_run=True)
|
342
|
+
|
343
|
+
with patch("rich.prompt.Confirm.ask", return_value=False) as mock_confirm:
|
344
|
+
with patch.object(Crackerjack, "execute_command") as mock_exec:
|
345
|
+
mock_exec.return_value = MagicMock(returncode=0)
|
346
|
+
cj._bump_version(options)
|
347
|
+
|
348
|
+
mock_confirm.assert_called_once_with(
|
349
|
+
"Are you sure you want to bump the minor version?", default=False
|
350
|
+
)
|
351
|
+
mock_exec.assert_not_called()
|
352
|
+
|
353
|
+
def test_bump_version_confirmation_major(
|
354
|
+
self,
|
355
|
+
mock_execute: MagicMock,
|
356
|
+
mock_console_print: MagicMock,
|
357
|
+
tmp_path: Path,
|
358
|
+
tmp_path_package: Path,
|
359
|
+
create_package_dir: None,
|
360
|
+
options_factory: t.Callable[..., OptionsForTesting],
|
361
|
+
) -> None:
|
362
|
+
options = options_factory(bump="major", no_config_updates=True)
|
363
|
+
cj = Crackerjack(dry_run=True)
|
364
|
+
|
365
|
+
with patch("rich.prompt.Confirm.ask", return_value=True) as mock_confirm:
|
366
|
+
with patch.object(Crackerjack, "execute_command") as mock_exec:
|
367
|
+
mock_exec.return_value = MagicMock(returncode=0)
|
368
|
+
cj._bump_version(options)
|
369
|
+
|
370
|
+
mock_confirm.assert_called_once_with(
|
371
|
+
"Are you sure you want to bump the major version?", default=False
|
372
|
+
)
|
373
|
+
mock_exec.assert_called_once_with(["pdm", "bump", "major"])
|
374
|
+
|
375
|
+
def test_bump_version_no_confirmation_micro(
|
376
|
+
self,
|
377
|
+
mock_execute: MagicMock,
|
378
|
+
mock_console_print: MagicMock,
|
379
|
+
tmp_path: Path,
|
380
|
+
tmp_path_package: Path,
|
381
|
+
create_package_dir: None,
|
382
|
+
options_factory: t.Callable[..., OptionsForTesting],
|
383
|
+
) -> None:
|
384
|
+
options = options_factory(bump="micro", no_config_updates=True)
|
385
|
+
cj = Crackerjack(dry_run=True)
|
386
|
+
|
387
|
+
with patch("rich.prompt.Confirm.ask") as mock_confirm:
|
388
|
+
with patch.object(Crackerjack, "execute_command") as mock_exec:
|
389
|
+
mock_exec.return_value = MagicMock(returncode=0)
|
390
|
+
cj._bump_version(options)
|
391
|
+
|
392
|
+
mock_confirm.assert_not_called()
|
393
|
+
mock_exec.assert_called_once_with(["pdm", "bump", "micro"])
|
394
|
+
|
304
395
|
def test_process_with_publish_option(
|
305
396
|
self,
|
306
397
|
mock_execute: MagicMock,
|
@@ -794,118 +885,6 @@ class TestCrackerjackProcess:
|
|
794
885
|
cj = Crackerjack(dry_run=True)
|
795
886
|
cj.process(options)
|
796
887
|
|
797
|
-
def test_project_manager_run_interactive_success(
|
798
|
-
self,
|
799
|
-
mock_execute: MagicMock,
|
800
|
-
mock_console_print: MagicMock,
|
801
|
-
tmp_path: Path,
|
802
|
-
tmp_path_package: Path,
|
803
|
-
create_package_dir: None,
|
804
|
-
) -> None:
|
805
|
-
with patch.object(ProjectManager, "execute_command") as mock_pm_execute:
|
806
|
-
mock_pm_execute.return_value = MagicMock(returncode=0, stdout="Success")
|
807
|
-
code_cleaner = CodeCleaner(console=Console())
|
808
|
-
config_manager = ConfigManager(
|
809
|
-
our_path=Path(),
|
810
|
-
pkg_path=Path(),
|
811
|
-
pkg_name="test",
|
812
|
-
console=Console(),
|
813
|
-
python_version="3.9",
|
814
|
-
dry_run=True,
|
815
|
-
)
|
816
|
-
pm = ProjectManager(
|
817
|
-
our_path=Path(),
|
818
|
-
pkg_path=Path(),
|
819
|
-
pkg_dir=Path(),
|
820
|
-
pkg_name="test",
|
821
|
-
console=Console(),
|
822
|
-
code_cleaner=code_cleaner,
|
823
|
-
config_manager=config_manager,
|
824
|
-
dry_run=True,
|
825
|
-
)
|
826
|
-
pm.run_interactive("black")
|
827
|
-
mock_pm_execute.assert_called_once_with(
|
828
|
-
["pre-commit", "run", "black", "--all-files"]
|
829
|
-
)
|
830
|
-
|
831
|
-
def test_project_manager_run_interactive_failure_retry(
|
832
|
-
self,
|
833
|
-
mock_execute: MagicMock,
|
834
|
-
mock_console_print: MagicMock,
|
835
|
-
tmp_path: Path,
|
836
|
-
tmp_path_package: Path,
|
837
|
-
create_package_dir: None,
|
838
|
-
) -> None:
|
839
|
-
with patch.object(ProjectManager, "execute_command") as mock_pm_execute:
|
840
|
-
mock_pm_execute.side_effect = [
|
841
|
-
MagicMock(returncode=1, stdout="", stderr="Failed"),
|
842
|
-
MagicMock(returncode=0, stdout="Success"),
|
843
|
-
]
|
844
|
-
with patch("builtins.input", return_value="y"):
|
845
|
-
code_cleaner = CodeCleaner(console=Console())
|
846
|
-
config_manager = ConfigManager(
|
847
|
-
our_path=Path(),
|
848
|
-
pkg_path=Path(),
|
849
|
-
pkg_name="test",
|
850
|
-
console=Console(),
|
851
|
-
python_version="3.9",
|
852
|
-
dry_run=True,
|
853
|
-
)
|
854
|
-
pm = ProjectManager(
|
855
|
-
our_path=Path(),
|
856
|
-
pkg_path=Path(),
|
857
|
-
pkg_dir=Path(),
|
858
|
-
pkg_name="test",
|
859
|
-
console=Console(),
|
860
|
-
code_cleaner=code_cleaner,
|
861
|
-
config_manager=config_manager,
|
862
|
-
dry_run=True,
|
863
|
-
)
|
864
|
-
pm.run_interactive("black")
|
865
|
-
assert mock_pm_execute.call_count == 2
|
866
|
-
mock_pm_execute.assert_called_with(
|
867
|
-
["pre-commit", "run", "black", "--all-files"]
|
868
|
-
)
|
869
|
-
|
870
|
-
def test_project_manager_run_interactive_failure_exit(
|
871
|
-
self,
|
872
|
-
mock_execute: MagicMock,
|
873
|
-
mock_console_print: MagicMock,
|
874
|
-
tmp_path: Path,
|
875
|
-
tmp_path_package: Path,
|
876
|
-
create_package_dir: None,
|
877
|
-
) -> None:
|
878
|
-
with patch.object(ProjectManager, "execute_command") as mock_pm_execute:
|
879
|
-
mock_pm_execute.return_value = MagicMock(
|
880
|
-
returncode=1, stdout="", stderr="Failed"
|
881
|
-
)
|
882
|
-
with patch("builtins.input", return_value="n"):
|
883
|
-
code_cleaner = CodeCleaner(console=Console())
|
884
|
-
config_manager = ConfigManager(
|
885
|
-
our_path=Path(),
|
886
|
-
pkg_path=Path(),
|
887
|
-
pkg_name="test",
|
888
|
-
console=Console(),
|
889
|
-
python_version="3.9",
|
890
|
-
dry_run=True,
|
891
|
-
)
|
892
|
-
pm = ProjectManager(
|
893
|
-
our_path=Path(),
|
894
|
-
pkg_path=Path(),
|
895
|
-
pkg_dir=Path(),
|
896
|
-
pkg_name="test",
|
897
|
-
console=Console(),
|
898
|
-
code_cleaner=code_cleaner,
|
899
|
-
config_manager=config_manager,
|
900
|
-
dry_run=True,
|
901
|
-
)
|
902
|
-
with pytest.raises(SystemExit) as excinfo:
|
903
|
-
pm.run_interactive("black")
|
904
|
-
assert excinfo.value.code == 1
|
905
|
-
mock_pm_execute.assert_called_once_with(
|
906
|
-
["pre-commit", "run", "black", "--all-files"]
|
907
|
-
)
|
908
|
-
|
909
888
|
def test_config_manager_swap_package_name(
|
910
889
|
self, mock_execute: MagicMock, mock_console_print: MagicMock, tmp_path: Path
|
911
890
|
) -> None:
|
@@ -88,8 +88,9 @@ def test_process_with_all_option(
|
|
88
88
|
crackerjack, mocks = mock_crackerjack
|
89
89
|
options = MockOptions(all="minor")
|
90
90
|
with patch.object(Crackerjack, "_run_tests"):
|
91
|
-
with patch("
|
92
|
-
|
91
|
+
with patch("rich.prompt.Confirm.ask", return_value=True):
|
92
|
+
with patch("builtins.input", return_value="Test commit message"):
|
93
|
+
crackerjack.process(options)
|
93
94
|
assert options.clean is True
|
94
95
|
assert options.test is True
|
95
96
|
assert options.publish == "minor"
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.11/3256171999636029978
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.4/10355199064880463147
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.6/15140459877605758699
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.1.9/17041001205004563469
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.11/18187162184424859798
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/16869036553936192448
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/1867267426380906393
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/4240757255861806333
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.12/4441409093023629623
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.13/1867267426380906393
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.13/4240757255861806333
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.2/4070660268492669020
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.3/9818742842212983150
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.4/9818742842212983150
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.6/3557596832929915217
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.7/10386934055395314831
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.11.7/3557596832929915217
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.12.0/5056746222905752453
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.2.0/10047773857155985907
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.2.2/18053836298936336950
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.3.0/12548816621480535786
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.3.3/11081883392474770722
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.3.5/16311176246009842383
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.0/11982804814124138945
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.6.0/12055761203849489982
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.7.3/16061516852537040135
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.8.4/16354268377385700367
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.10/12813592349865671909
RENAMED
File without changes
|
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.3/13948373885254993391
RENAMED
File without changes
|
{crackerjack-0.21.0 → crackerjack-0.21.1}/crackerjack/.ruff_cache/0.9.9/12813592349865671909
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|