Skip to content

Commit

Permalink
refactor: move patch_cli to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
athith-g committed Jul 30, 2024
1 parent c0aa63f commit 912f081
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tests/decryption/test_decrypt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for decrypt.py"""
import contextlib
import os
from pathlib import Path
import shutil
Expand All @@ -14,6 +13,7 @@
move_files,
get_args
)
from tests.utils import patch_cli

INPUT_DIR = Path(__file__).parents[2]/"inputs"
INPUT_TEXT = "hello world from the input!"
Expand Down Expand Up @@ -151,13 +151,6 @@ def test_permission_error(self, tmp_path):
move_files(file_paths=[INPUT_DIR/"hello.txt"], output_dir=output_dir)


@contextlib.contextmanager
def patch_cli(args):
"""Context manager that patches sys.argv."""
with mock.patch("sys.argv", args):
yield


class TestGetArgs:
"""Test get_args."""

Expand Down

0 comments on commit 912f081

Please sign in to comment.