# Path: zdict/zdict.py
# def main():
#     if user_set_encoding_and_is_utf8():
#         check_zdict_dir_and_db()
# 
#         global dictionary_map
#         dictionary_map = get_dictionary_map()
# 
#         args = get_args()
#         args = set_args(args)
# 
#         execute_zdict(args)
#     else:
#         exit()


import sys
import unittest
from contextlib import redirect_stdout
from io import StringIO
from unittest.mock import patch
from zdict.zdict import main




class TestMultiprocessing(unittest.TestCase):
    def test_multiprocessing(self):
        testargs = ['', '-j', '2', '-d', '-dt', 'yahoo', 'test']
        with patch.object(sys, 'argv', new=testargs):
            f1 = StringIO()
            with redirect_stdout(f1):
                main()

        testargs = ['', '-j', '-d', '-dt', 'yahoo', 'test']
        with patch.object(sys, 'argv', new=testargs):
            f2 = StringIO()
            with redirect_stdout(f2):

# Path: zdict/zdict.py
# def main():
#     if user_set_encoding_and_is_utf8():
#         check_zdict_dir_and_db()
# 
#         global dictionary_map
#         dictionary_map = get_dictionary_map()
# 
#         args = get_args()
#         args = set_args(args)
# 
#         execute_zdict(args)
#     else:
#         exit()


# Path: zdict/tests/test_arguments.py
import sys
import unittest
from contextlib import redirect_stdout
from io import StringIO
from unittest.mock import patch
from zdict.zdict import main





class TestMultiprocessing(unittest.TestCase):
    def test_multiprocessing(self):
        testargs = ['', '-j', '2', '-d', '-dt', 'yahoo', 'test']
        with patch.object(sys, 'argv', new=testargs):
            f1 = StringIO()
            with redirect_stdout(f1):
                main()

        testargs = ['', '-j', '-d', '-dt', 'yahoo', 'test']
        with patch.object(sys, 'argv', new=testargs):
            f2 = StringIO()
            with redirect_stdout(f2):

                main()