From b831a0f9ec6f39eb27bf93eb7fc0ec28542fc52c Mon Sep 17 00:00:00 2001 From: awaelchli Date: Tue, 5 Mar 2024 22:59:37 +0100 Subject: [PATCH] more test updates --- tests/test_adapter.py | 2 +- tests/test_adapter_v2.py | 2 +- tests/test_lora.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_adapter.py b/tests/test_adapter.py index d9fe9eae61..7415cdc5c2 100644 --- a/tests/test_adapter.py +++ b/tests/test_adapter.py @@ -167,7 +167,7 @@ def test_adapter_bitsandbytes(monkeypatch, tmp_path, fake_checkpoint_dir, alpaca monkeypatch.setattr(module, "fit", train_mock) stdout = StringIO() - with redirect_stdout(stdout): + with redirect_stdout(stdout), mock.patch("sys.argv", ["adapter.py"]): module.setup( data=Alpaca( download_dir=alpaca_path.parent, diff --git a/tests/test_adapter_v2.py b/tests/test_adapter_v2.py index 92b8a35a2b..283a97f90d 100644 --- a/tests/test_adapter_v2.py +++ b/tests/test_adapter_v2.py @@ -256,7 +256,7 @@ def test_adapter_v2_bitsandbytes(monkeypatch, tmp_path, fake_checkpoint_dir, alp monkeypatch.setattr(module, "fit", train_mock) stdout = StringIO() - with redirect_stdout(stdout): + with redirect_stdout(stdout), mock.patch("sys.argv", ["adapter_v2.py"]): module.setup( data=Alpaca( download_dir=alpaca_path.parent, diff --git a/tests/test_lora.py b/tests/test_lora.py index 62925f229c..aae1152168 100644 --- a/tests/test_lora.py +++ b/tests/test_lora.py @@ -625,7 +625,7 @@ def test_lora_bitsandbytes(monkeypatch, tmp_path, fake_checkpoint_dir, alpaca_pa monkeypatch.setattr(module, "fit", train_mock) stdout = StringIO() - with redirect_stdout(stdout): + with redirect_stdout(stdout), mock.patch("sys.argv", ["full.py"]): module.setup( data=Alpaca( download_dir=alpaca_path.parent,