File size: 406 Bytes
92cc291
 
5cbd28e
92cc291
c228ada
 
7a05cd7
 
 
 
c228ada
 
 
78d0ff1
c228ada
 
 
 
78d0ff1
c228ada
 
 
78d0ff1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python

"""Tests for the CLI interface."""

import sys

import pytest

from deep_translator.cli import CLI


@pytest.fixture
def mock_args():
    sys.argv[1:] = ["--source", "en", "--target", "de", "--text", "hello"]
    return CLI(sys.argv[1:]).parse_args()


def test_source(mock_args):
    assert mock_args.source == "en"


def test_target(mock_args):
    assert mock_args.target == "de"