

'''simple docstring'''






from unittest.mock import Mock, patch

from file_transfer.send_file import send_file


@patch('''socket.socket''' )
@patch('''builtins.open''' )
def 						_A	(       A__	,							A__ ):






 """simple docstring"""



 __lowercase				    =					Mock()
 __lowercase				    =					conn, Mock()
 __lowercase				    =					iter([1, None] )
 __lowercase				    =					lambda A__ : next(A__ )

 # ===== invoke =====
 send_file(filename='''mytext.txt'''	,							testing=A__ )

 # ===== ensurance =====
 sock.assert_called_once()
 sock.return_value.bind.assert_called_once()
 sock.return_value.listen.assert_called_once()
 sock.return_value.accept.assert_called_once()
 conn.recv.assert_called_once()

 file.return_value.__enter__.assert_called_once()
 file.return_value.__enter__.return_value.read.assert_called()

 conn.send.assert_called_once()
 conn.close.assert_called_once()
 sock.return_value.shutdown.assert_called_once()
 sock.return_value.close.assert_called_once()




"""simple docstring"""
import math




def 					a__						(						lowerCAmelCase    )	-> list[int]:
      UpperCAmelCase__			:							Optional[int]							=    []
      UpperCAmelCase__			:							Union[str, Any]							=    2
      UpperCAmelCase__			:							List[Any]							=    int(math.sqrt(lowerCAmelCase    )    )  # Size of every segment
      UpperCAmelCase__			:							Dict							=    [True] * (end + 1)
      UpperCAmelCase__			:							str							=    []

      while start <= end:
            if temp[start] is True:
                  in_prime.append(lowerCAmelCase    )
                  for i in range(start * start			,	end + 1			,	lowerCAmelCase    ):
                        UpperCAmelCase__			:							Optional[Any]							=    False
            start += 1
      prime += in_prime

      UpperCAmelCase__			:							Optional[Any]							=    end + 1
      UpperCAmelCase__			:							Dict							=    min(2 * end			,	lowerCAmelCase    )

      while low <= n:
            UpperCAmelCase__			:							Optional[int]							=    [True] * (high - low + 1)
            for each in in_prime:
                  UpperCAmelCase__			:							Optional[int]							=    math.floor(low / each    ) * each
                  if t < low:
                        t += each

                  for j in range(lowerCAmelCase			,	high + 1			,	lowerCAmelCase    ):
                        UpperCAmelCase__			:							int							=    False

            for j in range(len(lowerCAmelCase    )    ):
                  if temp[j] is True:
                        prime.append(j + low    )

            UpperCAmelCase__			:							Dict							=    high + 1
            UpperCAmelCase__			:							int							=    min(high + end			,	lowerCAmelCase    )

      return prime





print(sieve(10**6))

