Python ??? ?????? ?? ?? ??? ??? ?? ?? Cleaner Pytest ?????? ??????. 1. UnitTest? ???? ?? UnitTest.testcase?? ?? ? ??? ???? ???? Test_? ???? ???? ???? ?? ?? ???? ??? ???????. 2. Pytest?? ??? ?? ???? ???? ??? Test_? ???? ??? ???? ???? Assert ?? ??????. 3. ??? ?? ?? ??, ???? ?? ?? ? ?? ??? ?? ?? ?? ??? ?? ?? ???????. 4. GIT ??, CI/CD ?? (? : GitHub ??) ?? IDE ??? ?? ??? ???? ?? ? ??? ? ???? ???? ?? ?? ? ?? ???? ??????.
Python ?? ???? ??? ??? ?????. ??? ??? ???? ??? ???? ????? ?????. ?? ????? ??, ??? ?? ?? ??? ??? ???? ???? ???? ????.
unittest
? ?? ?? ??? ??? ??????
Python?? unittest
?? ?? ??? ??? ??? ?????. Java? Junit?? ??? ???? ??? ???, ?? ? ?? ?? ?? ?????.
?? ??? ??? ????.
-
unittest.TestCase
?? ???? ??? ???? ???? -
test_
? ???? ?? ?? -
self.assertEqual()
,self.assertTrue()
?? ?? ?? ?? ???? ??? ??????.
?:
import unittest def add (a, b) : AB? ????? ??? testmathFunctions (unittest.testcase) : def test_add (self) : self.assertequal (Add (2, 3), 5) self.assertequal (Add (-1, 1), 0) __name__ == '__main__': UnitTest.Main ()
? ????? ???? UnitTest? ???? ???? ????????.
? ???? ??? ???? ?? pytest
???????
unittest
?? ??? ?? ?? ???? pytest
???????. ?? ??? ??? ? ?? ??? ??? ??? ??? ? ????.
????? :
- Pytest ?? :
pip install pytest
-
test_
? ???? ?? ?? - ?????
pytest
??????
?:
def ??? (a, b) : a * b? ?????? def test_multiply () : ??? (2, 3) == 6? ?????? ??? ( 'a', 3) == 'aaa'
??? test_math.py
? ???? pytest
??????. ?? ?? ?? ???? ?? ???? ?????.
Pytest? ?? ? ?? ? ??? ??????. pytest-cov
? ?? ????? ??? ??? ???? ? ????? ?? ??? ?? ?????? ?? ??????.
?? ??? ? ?? ??? ?? ????
?? ?? ???? ?? ? ? "??? ??"? ?? ??? ? ? ??? ?? ??? ?? ??? ?? ???? ?????.
??????? :
- ???? ?? ?? (? : int? ???? ??? ??)
- ?? ?? (? ?? ?? 0 ?)
- ?? ?? (??? ??? ???? ??????)
?? ??:
def divide (a, b) : B == 0 : ValueError Raise ( "0?? ?? ? ??") ?? a / b def test_divide () : Divide (10, 2) == 5? ?????? pytest.raises (ValueError)? ?? : ??? (1, 0)
?? ???, ??? ?? ???? ?? ???? ?? ??? ??? ???? ??????? ????.
??? ?? ???? ???????
?? ???? ???? ???? ?? ?? ?????. ???? ??? ???? ?? ??? ?? ? ? ????.
- git ? (?? ?? ??? ??)
- Github Actions, Gitlab CI ?? Travis CI? ?? CI/CD ??
- IDE ?? (??? ???? ????? ???? ?? ???)
?? ??? ???? ???? ??? ??? ??? CI ??? ??? ??????. ????? ??? ??? ?? ?? ??? ???? ??? ? ?? ? ????.
????? ?? ??. ?? ???? ???? ?? ?????? ?? ?? ??? ? ?? ????? ??? ?? ??? ??? ?????.
? ??? ??? ??? ??? ???????? ?? ?????. ??? ??? 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)

Seaborn 's Loctplot? ???? ? ?? ?? ??? ??? ???? ??????. 2. ?? ???? sns.jointPlot (data = tips, x = "total_bill", y = "tip", ?? = "scatter")? ?? ?????. ??? ????? ?????? ??? ??? ?????. 3. ???? ?? ??? ??? = "reg"? ???? marginal_kws? ???? ?? ?? ???? ?????. 4. ??? ??? ? ?? "Hex"? ???? ?? ????.

??? ??? ".join (Words)? ?? join () ???? ?? ? ? ????. 2. ?? ??? ???? ?? MAP (str, ??) ?? [str (x) forxinnumbers]??? ???? ???????. 3. ?? ?? ??? ???? ??? ??? ?????? ???? ?? ?? ? ? ????. 4. '|'.join (f "[{item}]"furiteminitems) ??? ?? join ()? ?? ? ??? ????? ??? ?? ??? ??? ? ????.

pandas.melt ()? ???? ?? ???? ? ???? ???? ? ?????. ?? ID_VARS? ???? ? ? ??? ???? ????. ??, 4.Value_name = 'score'? ?? ?? ? ? ??? ???? ????? ??, ?? ? ??? ??? ? ?? ?????.

pythontanbeoptimizedformemory-boundoperations? Headgroughgenerations, ??? ? ??? ??, ? ManagingObjectLifetimes.first, usegeneratorsinsteadoflistStoprocessLargedAtasetSoneitematime, theintintomemory.second? ?????

PyoDBC ?? : PipinStallPyODBC ??? ???? ?????? ??????. 2. SQLSERVER ?? : PYODBC.connect () ???? ?? ????, ??, ??????, UID/PWD ?? Trusted_Connection? ?? ? ?? ???? ???? SQL ?? ?? Windows ??? ?? ?????. 3. ??? ????? ?????? : pyodbc.drivers ()? ???? 'sqlserver'? ?? ? ???? ??? ????? ??? ???? ??? 'sqlserver ? Odbcdriver17? ?? ??? ???? ??? ????? ??????. 4. ?? ???? ? ?? ??

?? ??, ??? ? ??? ??? ?? ? ContactForm ??? ?????. 2.????, ?? ??? ?? ??? ???? ????, ??? ?? ? ? cleaned_data? ???? ??? ?????. ??? ??? ? ??? ??????. 3. ????? {{form.as_p}}? ???? ??? ????? {%csrf_token%}? ???? CSRF ??? ?????. 4. URL ???? Point / Contact / Contact_View??? ?????. modelform? ???? ??? ?? ???? ??? ??? ??????. ?? ?? ??? ??, HTML ??? ? ?? ????? ?? ??? ????, ?? ??? ?? ??? ?? ??? ?????.

?? ?? ?? ? ?? ?? ??? ??? ??? ???? ?? ???? ?? ???? ???? ?? ?????. ?? ??? ?? ???? ??? ?, ? ?? ??? ????? ?? ???? ??? ? ??? ?? ??? ???? ??? ????. ???? ??? ??? ???? ?? ?? ?? ??? ???? ????? ????? ???? ?????? ????. ??? ??? ?? ??? ?????? ???? ?? ?? ??? ?????. cryptocurrency ???? ??? ?? ??? ?? ?? ??? ? ???? ??? ???? ?? ?? ?? ????. ?? ?? ??? ?? ?? ??? 24 ?? ?? ???? ??? ??, ?? ??? ?? ? ?? ?????? ?? ?????. ? ??? ?? ??? ?? ?? ?? ??? ??? ???? ?????.

iter ()? ??? ??? ?? ? ???? ?? ()? ?? ??? ?? ? ?????. 1. iterator ()? ???? ??? ?? ?? ??? ??? ???? ?????. 2. ?? ()? ???? ??? ??? ?? ??? ?? ? ? ??? ?? ??? ??; 3. ?? (???, ???)? ???? ??? ?????. 4. ??? ???? ?? ??? ???? ?? __iter __ () ? __next __ () ???? ???????. ???? ???? ?? ??? ??????? ???? ???? ?? ????? ???? ??????.
