Archive › Programming

pytest from behind a firewall

I wanted to try out pytest (or py.test, I’ve heard it both ways). But I’m behind a firewall, so pip and easy_install don’t work that great. I’m also running cygwin, with several versions of python so I can test compatibility of scripts across 2.6, 2.7, and 3.2. Trial and error gets me to these steps [...]

Comments ( 1 )

Testing in Python

I’ve been using Python for writing test code for many years now. I’ve used several test frameworks, most of them proprietary. However, I’d like to utilize some of the open source frameworks available. Right now, I’m doing two things. 1. Writing my own framework. 2. Investigating pytest. Hopefully I will have some results from both [...]

Comments ( 0 )

C++ zero padded string from int

Using an output string stream is a handy way to convert a number to a string. However, what if you want to zero pad the number. Well, that’s where iomanip comes in handy. output:

Comments ( 0 )

C++ variable scope and the for loop

C++ allows you to re-use variables in nested scopes. A confusion arises sometimes, especially with those new to C++ rules, as to the variables at the top of a for loop. In a for loop, such as for (int i = 0; i < 2; i++) { … }, does the int i belong to [...]

Comments ( 0 )

Compiling C++ code on the command line

Quick instructions for compiling small C++ projects on the command line in bash.

Comments ( 0 )
Page 1 of 512345