background preloader

Test-Driven Development with Python

Test-Driven Development with Python
Test-Driven Development with Python Test-Driven Development with Python Harry Percival Gillian McGarvey Rebecca Demarest Wendy Catalano Randy Comer David Futato Copyright © 2014 Harry Percival Printed in the United States of America. O’Reilly books may be purchased for educational, business, or sales promotional use. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. Praise for Test-Driven Development with Python Table of Contents © 2013, O’Reilly Media, Inc. Related:  DevOps

PyQt4 tutorial This is PyQt4 tutorial. The tutorial is suited for beginners and intermediate programmers. After reading this tutorial, you will be able to program non trivial PyQt4 applications. PyQt5 tutorial is the successor of this tutorial. Table of contents E-book A unique e-book covering advanced features of the PyQt4 library: Advanced PyQt4 tutorial. Related tutorials To refresh your knowledge of the Python language there is a Python tutorial on ZetCode. wxPython tutorial, PyGTK tutorial and Tkinter tutorial are tutorials for other popular Python GUI bindings. 1.3. A Quick Tour — Buildbot 0.9.12 documentation 1.3.1. Goal This tutorial will expand on the First Run tutorial by taking a quick tour around some of the features of buildbot that are hinted at in the comments in the sample configuration. As a part of this tutorial, we will make buildbot do a few actual builds. This section will teach you how to: make simple configuration changes and activate themdeal with configuration errorsforce buildsenable and control the IRC botenable ssh debuggingadd a ‘try’ scheduler 1.3.2. Let’s start simple by looking at where you would customize the buildbot’s project name and URL. We continue where we left off in the First Run tutorial. Open a new terminal, and first enter the same sandbox you created before (where $EDITOR is your editor of choice like vim, gedit, or emacs): cd ~/tmp/bb-master source sandbox/bin/activate $EDITOR master/master.cfg Now, look for the section marked PROJECT IDENTITY which reads: After making a change go into the terminal and type: 1.3.3. This creates a Python SyntaxError. 1.3.4. Note

Changing Between Spaces and Tabs in Sublime Text Sublime Text is pretty dang good at making it easy to switch between using tabs and spaces to indent your code. More importantly, it makes it easy to adjust the indentation of code that doesn't match your preference. I thought I'd put this together for reference, as there is a particular sequence of steps for some of the transitions that needs to be followed. The first step is making sure your User Preferences are how you like them. I prefer spaces, so my settings are like this: Adjust to your liking there. You can override these settings on any given file, from the bottom right. This is also headquarters for fixing up a document that isn't how you like it. Changing from Tabs to Spaces (Same Level of Indentation) Here's a document that is in tabs right now. You can see that those Tabs are 2 spaces wide. And I'm good to go for that case. Changing from Tabs to Spaces (Different Level of Indentation) Let's say a straight conversion from tabs to spaces isn't going to do it for me. .editorconfig

Python Programming Python Programming From Wikibooks, open books for an open world Jump to: navigation, search This book describes Python, an open-source general-purpose interpreted programming language available for a broad range of operating systems. There are currently three major implementations: the standard implementation written in C, Jython written in Java, and IronPython written in C# for the .NET environment. There are two common versions currently in use: 2.x and 3.x. Contents[edit] Intro[edit] Overview Getting Python Setting it up Interactive mode Self Help Basics[edit] Creating Python programs Variables and Strings Basic syntax Sequences (Strings, Lists, Tuples, Dictionaries, Sets) Data types Numbers Strings Lists Tuples Dictionaries Sets Basic Math -- redundant to "Operators" Operators Control Flow Decision Control Conditional Statements Loops Functions Scoping Input and output Files Text Modules Classes Exceptions Errors Source Documentation and Comments Idioms Advanced[edit] Decorators Context Managers Reflection Metaclasses Email Qt4

Continuous Integration - Full Stack Python Continuous integration automates the building, testing and deploying of applications. Software projects, whether created by a single individual or entire teams, typically use continuous integration as a hub to ensure important steps such as unit testing are automated rather than manual processes. Why is continuous integration important? When continuous integration (CI) is established as a step in a software project's development process it can dramatically reduce deployment times by minimizing steps that require human intervention. Automated testing Another major advantage with CI is that testing can be an automated step in the deployment process. The automated testing on checked in source code can be thought of like the bumper guards in bowling that prevent code quality from going too far off track. Continuous integration example The following picture represents a high level perspective on how continuous integration and deployment can work. Open source CI projects Jenkins CI resources

Effective Django — Effective Django What's in a transport layer? Microservices are small programs, each with a specific and narrow scope, that are glued together to produce what appears from the outside to be one coherent web application. This architectural style is used in contrast with a traditional "monolith" where every component and sub-routine of the application is bundled into one codebase and not separated by a network boundary. In recent years microservices have enjoyed increased popularity, concurrent with (but not necessarily requiring the use of) enabling new technologies such as Amazon Web Services and Docker. In this article, we will take a look at the "what" and "why" of microservices and at gRPC, an open source framework released by Google, which is a tool organizations are increasingly reaching for in their migration towards microservices. Why Use Microservices? To understand the general history and structure of microservices emerging as an architectural pattern, this Martin Fowler article is a good and fairly comprehensive read.

The Programming Historian - 1st edition The evolution of data center networks I asked Dinesh Dutt, chief scientist at Cumulus Networks and author of BGP in the Datacenter, to discuss how data centers have changed in recent years, new tools and techniques for network engineers, and what the future may hold for data center networking. Here are some highlights. How have data centers evolved over the past few years? Modern data centers have come a long way from when I first began working on them in 2007. Pioneers such as Google and Amazon started a trend that many others now try to emulate. First, more people are embracing the Clos network topology and routing as the fundamental rubric of the modern data center. Second, automation is more ubiquitously embraced as a mandatory requirement rather than a nice to have. Third, disaggregated solutions or white box switching, where the hardware and software are acquired separately from different vendors, is steadily gaining ground. What are some of the traditional approaches to troubleshooting networks?

Related: