TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #273 · 26 јул.

В стандартном модуле random есть две очень похожие функции random.randint() random.randrange() Обе возвращают случайное значение из указанного диапазона >>> random.randint(10, 20) 12 >>> random.randrange(10, 20) 17 В чем же отличие? Дело в том что у randrange() есть третий параметр step. randint() действительно возвращает случайное число из указанного диапазона. randrange() на первый взгляд делает тоже самое если передать также два параметра. Но есть указать еще и step то наш диапазон усложняется, то есть в него попадёт не полный ряд значений. Например, я хочу получить случайное значение из диапазона но только чётное число. Тогда достаточно сделать так: >>> randrange(10, 20, 2) 16 Таким образом получается что randint это частный случай randrange без указания параметра step. Еще одно важное отличие в том, что randint() включает в диапазон второе значение а randrange() нет. То есть выражение randrange(10, 20) никогда не вернёт 20, а randint(10, 20) вернёт. #tricks#basic

Резултати

Пронајдени 4 слични објави

Пребарај: #tdd

当前筛选 #tdd清除筛选
djangoproject

@djangoproject · Post #198 · 29.11.2016 г., 16:10

https://code.tutsplus.com/tutorials/beginning-test-driven-development-in-python--net-30137 Test-driven development (#TDD) is a process that has been documented considerably over recent years. A process of baking your tests right into your everyday coding, as opposed to a nagging afterthought, should be something that developers seek to make the norm, rather than some ideal fantasy. I will introduce the core concepts of TDD.

Hashtags

djangoproject

@djangoproject · Post #334 · 09.05.2017 г., 05:21

https://code.tutsplus.com/tutorials/beginning-test-driven-development-in-python--net-30137 #Test-driven development (#TDD) is a process that has been documented considerably over recent years. A process of baking your tests right into your everyday coding, as opposed to a nagging afterthought, should be something that developers seek to make the norm, rather than some ideal fantasy.

Hashtags

djangoproject

@djangoproject · Post #403 · 05.08.2017 г., 02:13

http://index-of.es/Python/Foundations.of.Agile.Python.Development.Jeff.Younker.2008.pdf What Is Agile Development? #Agile development is a term given to an entire class of iterative development methodologies. Their unifying characteristic is a focus on short development cycles, on the scale of weeks rather than months. Each development cycle, referred to as an iteration or sprint, produces a working product. #TDD#test

djangoproject

@djangoproject · Post #576 · 02.03.2018 г., 12:52

https://www.obeythetestinggoat.com/pages/book.html#toc "Test-Driven Web Development with Python" aims to teach #TDD for web programming. It uses a concrete example — the development of a website, from scratch — to explain the TDD metholology and how it applies to building web applications. It covers the #Selenium browser-automation tool, #unit_testing, mocking, and interacting with Web technologies from the basics of static content, database integration, throught the inescapable JavaScript, and onto more advanced (and trendy) topics like #NoSQL, #websockets and Async programming.