?? Python ????? ??? ??? ??? ???? ?? ?? ??? ???? ???? ? ????? ??? ??????. ??? ?? ?? ??? ??? ?? ??? ??? ??? ??? ??? ????. ?? ??? ??? ? ??? ? ? ?? 8?? ??? Python ??? ??? ?? ???? ???????.
Pytest? ???? ????? ?? ?? ???? ??? ????????. ?? ???? ?? ???? ??? ??? ????? ???? ??? ? ????. ??? ?? ???? ???? ??? ????:
import pytest @pytest.fixture def sample_data(): return [1, 2, 3, 4, 5] def test_sum(sample_data): assert sum(sample_data) == 15 def test_length(sample_data): assert len(sample_data) == 5
Pytest? ????? ??? ? ?? ?????. ?? ?? ?? ???? ??? ???? ??? ? ?? ?? ??? ?????.
import pytest @pytest.mark.parametrize("input,expected", [ ("hello", 5), ("python", 6), ("testing", 7) ]) def test_string_length(input, expected): assert len(input) == expected
pytest? ???? ???? ???? ??? ??? ??? ?? ???? ?????. ?? ?? ???? ? ? ??? ?? ?? ?? ??? ?? pytest-cov???.
?? ?????? ??? ?? ?? ???? ? ??? ?? ??? ??? ?? ?????. ???? ??? ??? ???? ?? ?? ???? ??? ???? ??? ?????.
from hypothesis import given, strategies as st @given(st.lists(st.integers())) def test_sum_of_list_is_positive(numbers): assert sum(numbers) >= 0 or sum(numbers) < 0
?? ? ??? ??? ?? ?? ??? ???? ? ???? ?????. unittest.mock ??? ??? ??? ?? ??? ??? ?????:
from unittest.mock import patch def get_data_from_api(): # Actual implementation would make an API call pass def process_data(data): return data.upper() def test_process_data(): with patch('__main__.get_data_from_api') as mock_get_data: mock_get_data.return_value = "test data" result = process_data(get_data_from_api()) assert result == "TEST DATA"
?? ????? ????? ?? ??? ????? ?? ?? ??? ???? ?? ?????. ?? ???? ?? ?? ???? ???? ?? pytest? ?? Coverage.py? ?????.
# Run tests with coverage # pytest --cov=myproject tests/ # Generate HTML report # coverage html
Behavior? ??? ?? ?? ??(BDD)? ??? ?????? ???? ????? ?? ??? ??? ? ??? ?????. ???? ???? ???? ????? ??? ?????.
# features/calculator.feature Feature: Calculator Scenario: Add two numbers Given I have entered 5 into the calculator And I have entered 7 into the calculator When I press add Then the result should be 12 on the screen
# steps/calculator_steps.py from behave import given, when, then from calculator import Calculator @given('I have entered {number:d} into the calculator') def step_enter_number(context, number): if not hasattr(context, 'calculator'): context.calculator = Calculator() context.calculator.enter_number(number) @when('I press add') def step_press_add(context): context.result = context.calculator.add() @then('the result should be {expected:d} on the screen') def step_check_result(context, expected): assert context.result == expected
?? ???? ???? ??? ??? ???? ??? ???? ? ?? ?????. ?? ?? ??? ???? ???? ?? pytest-benchmark? ?????:
def fibonacci(n): if n < 2: return n return fibonacci(n-1) + fibonacci(n-2) def test_fibonacci_performance(benchmark): result = benchmark(fibonacci, 10) assert result == 55
mutmut? ?? ??? ??? ???? ???? ??? ?? ??? ??? ???? ? ?? ?? ? ??? ?????. ??? ?? ??(??)? ???? ????? ??? ?? ??? ????? ?????.
mutmut run --paths-to-mutate=myproject/
???? ?? ??? ???? ?? ????? ????? ??? ????? ???? ??????. ? ??????? ?? Selenium? ?? ?????.
from selenium import webdriver from selenium.webdriver.common.keys import Keys def test_search_in_python_org(): driver = webdriver.Firefox() driver.get("http://www.python.org") assert "Python" in driver.title elem = driver.find_element_by_name("q") elem.clear() elem.send_keys("pycon") elem.send_keys(Keys.RETURN) assert "No results found." not in driver.page_source driver.close()
?? ??? ?????? ??? ???? ???? ????? ???? ????? ???? ?? ?????. ?? ?? ?????? ??? ???? ??? ????.
myproject/ __init__.py module1.py module2.py tests/ __init__.py test_module1.py test_module2.py
??? ??(CI)? ??? ???? ??? ??? ???. ?? Jenkins? GitHub Actions? ?? ??? ???? ?? ??? ?? ???? ???? ?????.
import pytest @pytest.fixture def sample_data(): return [1, 2, 3, 4, 5] def test_sum(sample_data): assert sum(sample_data) == 15 def test_length(sample_data): assert len(sample_data) == 5
??? ??? ???? ????? ???? ??? ?????. ?? ????? ???? ?? ? ??????, ??? ???? ????, ??? ???? ??? ??? ?? ??? ???? ?????. ?? ?? ?? ???? ?? ?? ???? ???? ??? ?? ??? ????? ????? ?????.
??? ?? ??(TDD)? ? ?? ??? ???? ??? ?????. ??? ???? ?? ???? ???? ?? ??? ??? ?? ? ?? ?????? ????? ? ??? ???.
import pytest @pytest.mark.parametrize("input,expected", [ ("hello", 5), ("python", 6), ("testing", 7) ]) def test_string_length(input, expected): assert len(input) == expected
?? ???? ?? ?? ?? ?? ? ?? ??? ????? ???? ? ?? ?????. ???? ????? ??? ?? ?? ??? ?? ??? ?? ??? ???? ?? ?????.
from hypothesis import given, strategies as st @given(st.lists(st.integers())) def test_sum_of_list_is_positive(numbers): assert sum(numbers) >= 0 or sum(numbers) < 0
????? ?? ???? ???? ?? ??? ? ????. ?? ??? ? ?? ???? ? ??? ??? ??? ?? ?????.
from unittest.mock import patch def get_data_from_api(): # Actual implementation would make an API call pass def process_data(data): return data.upper() def test_process_data(): with patch('__main__.get_data_from_api') as mock_get_data: mock_get_data.return_value = "test data" result = process_data(get_data_from_api()) assert result == "TEST DATA"
Python?? ??? ?????? ????? ??? ?? ???? ?? ? ????? ????. pytest-asyncio ????? ?? ?? ?? ??????.
# Run tests with coverage # pytest --cov=myproject tests/ # Generate HTML report # coverage html
??? ??? ???? ?? ?? ? ???? ??? ????? ?? ?????. ???? ?? ? ?? ??? ?? ???? ??? ?????.
# features/calculator.feature Feature: Calculator Scenario: Add two numbers Given I have entered 5 into the calculator And I have entered 7 into the calculator When I press add Then the result should be 12 on the screen
pytest? ?????? ???? ???? ?? ???? ??? ??? ??? ??? ?????.
# steps/calculator_steps.py from behave import given, when, then from calculator import Calculator @given('I have entered {number:d} into the calculator') def step_enter_number(context, number): if not hasattr(context, 'calculator'): context.calculator = Calculator() context.calculator.enter_number(number) @when('I press add') def step_press_add(context): context.result = context.calculator.add() @then('the result should be {expected:d} on the screen') def step_check_result(context, expected): assert context.result == expected
?????? ?? ???? ?? ??? ??? ??? ???? ?? ??? ? ??????? ????? ?? ??????? ????.
def fibonacci(n): if n < 2: return n return fibonacci(n-1) + fibonacci(n-2) def test_fibonacci_performance(benchmark): result = benchmark(fibonacci, 10) assert result == 55
??? ?? ???? ? ???????? ??? ?? UI ?? ??? ???? ? ??????. ??? ?? ?????? ??? pytest-playwright? ?? ??? ???? ? ????? ???? ? ????.
mutmut run --paths-to-mutate=myproject/
??? ??? ??? ?????? Python ????? ??? ???? ?? ???????. ???? ???? ?????? ???? ?? ??? ???? ?? ??? ?? ???? ??? ?? ???? ?? ?????. ??? ?? ??? ????? ???? ???? ?????? ??? ??? ???? ?? ?? ??? ??? ???? ? ??? ???.
101?
101 Books? ?? Aarav Joshi? ?? ??? AI ?? ??????. ?? AI ??? ???? ?? ??? ?? ? ?? ??? ?? ?????. ?? ??? ??? $4?? ???? ?? ??? ??? ??? ??? ? ????.
????? ?? ? ?? Golang Clean Code ?? ??? ???.
????? ???? ??? ?? ??? ??? ????. ?? ??? ? Aarav Joshi? ??? ? ?? ?? ?????. ??? ??? ???? ????? ?????!
??? ???
?? ???? ? ??? ???.
???? ??? | ??? ?? ???? | ?? ?? ??? | ????? | ??? ??? | ????? ???? | ???? | ??? ??? | JS ??
??? ??? ????
?? ??? ???? | Epochs & Echoes World | ??????? | ???? ???? ?? | ??? ??? ?? | ?? ????
? ??? ?? ??? ????? ??? Python ??? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











Python? Unittest ? Pytest? ??? ? ???? ??, ?? ? ??? ????? ? ?? ?? ???? ??? ??? ?????. 1. ??? ??? ?? ??? ???? ??? ??? ??? ?????. UnitTest? ??? ??? ???? ???? Test \ _? ???? ???? ?????. Pytest? ? ?????. Test \ _?? ???? ?? ? ??????. 2. ??? ?? ?? ? ?? ? ??? ??? ????. UnitTest? Assertequal, AssertTrue ? ?? ??? ???? ?? Pytest? ??? Assert ?? ???? ?? ?? ??? ???? ?????. 3. ?? ??? ?? ? ?? ????? ????? ????.

pythonisidealfordataanalysisduetonumpyandpandas.1) numpyexcelsatnumericalcomputationsfast, multi-dimensionalArraysandectorizedOferationsLikenp.sqrt ()

?? ????? (DP)? ??? ??? ? ??? ?? ??? ??? ??? ? ??? ??? ?? ??? ???? ??? ????? ??????. ? ?? ?? ??? ????. 1. ??? (??) : ??? ?? ??? ???? ??? ???? ?? ??? ??????. 2. ??? (?) : ?? ???? ???? ????? ?????. ???? ???, ?? ?? ?? ?? ??/?? ?, ??? ??? ?? ?? ?? ??? ??? ????? ?????. ?????? ????? ?? ???? ?? ??? ? ???, ?? ??? ???? ?? ?? ??? ???? ??? ???? ????? ???? ???????.

??? ?? ???? ????? ????? __iter_ ? __next__ ???? ???????. ① __iter__ ???? ??? ? ?? ??? ???? ??? ?? ?? ??? ?????. ② __next__ ???? ? ??? ?? ????, ?? ??? ??? ????, ? ?? ??? ??? stopiteration ??? ??????. status ??? ???? ??????? ?? ??? ??? ?? ?? ??? ???????. pile ?? ?? ???? ?? ??? ?? ? ??? ?? ? ??? ?????? ?????. simple ??? ??? ?? ?? ??? ?? ???? ???? ?? ??? ? ??? ?? ????? ???? ??? ??? ???????.

Python? ?? ???? ?? ???, ?? ?? ????, ?? ???? ?? ? AI/ML ??? ???? ??? ?????. ??, Cpython? ???? ????? ?? ??, ?? ?? ??? ? ?? ? ?? ??? ?? ??? ??????. ??, ??? ????? ?? ?? ? ?? ??? ????? ?? ?? ? ? ??? ?? ?????. ??, Pyscript ? Nuitka? ?? ?? ???? ??? ??? ?? ??? ?????. ?????, AI ? ??? ?? ??? ?? ???? ??? ?? ???????? ???? ?? ? ??? ?????. ??? ??? Python? ??? ??? ????? ???? ?? ??? ???? ??? ?????.

Python? ?? ??? ???? ?????? ????, ????? ? ?? ??????? ???? ? ??? ??? ???? ?? ??? ?????. ?? TCP ??? ????? Socket.Socket ()? ???? ??? ??? ?? ? ??? ????? .listen ()? ???? ??? ?? .accept ()? ?? ????? ??? ???????. TCP ?????? ????? ?? ??? ??? ??? ????? .connect ()? ?? ? ?? .sendall ()? ???? ???? ??? .recv ()? ?? ??? ??????. ?? ?????? ????? 1. ??? : ??? ??? ? ???? ??? ? ????. 2. ??? I/O : ?? ??, Asyncio ?????? ? ??? ??? ?? ? ? ????. ???? ? ?

???? Python ?? ?? ?????? ?? ????, "??? ?????, ?? ??"? ???? ??? ??? ??? ?? ??? ?????. 1. ???? ?? ? ??? ?? ?????. ?? ???? ?? ??? ???? ??? ? ? ????. ?? ??, Spoke () ?? ???? ??? ??? ?? ??? ?? ????? ?? ??? ??? ????. 2. ???? ?? ???? ??? ??? ?????? Draw () ???? ???? ????? ?? ???? ?? ??? ???? ??? ???? ?? ?? ?? ??? ????? ?? ?? ????? ?? ?????. 3. Python ?? ???? ???????. ?? ???? ??? ???? ?? ???? ??? ????? ??? ?? ???? ??? ???? ????. ??? ??? ??? ???? ? ??? "?? ??"??????. 4. ???? ? ???? ?? ??? ?????

Python List ????? ?? ?? ??? [Start : End : Step] ??? ????? ??? ???? ????. 1. ?? ????? ?? ??? ?? [start : end : step]???. ??? ?? ??? (??), ?? ? ??? (???? ??)?? ??? ?? ?????. 2. ????? ???? 0?? ????? ???? ????? ??? ??? ???? ????? ??? 1? ??????. 3. my_list [: n]? ???? ? ?? n ??? ?? my_list [-n :]? ???? ??? n ??? ????. 4. My_List [:: 2]? ?? ??? ?? ?? ??? ???? ??? ??? ?? ?? ?? ??? ???? ? ????. 5. ???? ???? ? ???? ???? ????
