George V. Reilly

Nosetests won't discover tests in executable files

We use Nose to run unit tests. I noticed that we had some tests that weren’t being run, and it took me some time to work out why. Eventually, I found this checklist, which told me to "make sure the files in your tests directory are not executable".

A quick chmod -x *.py later and nosetests project/tests suddenly found all the tests.

Now that I know what to look for, I found this in the Nose docs:

It is important to note that the default behavior of nose is to not include tests from files which are executable.

--exe: Look for tests in python modules that are executable. Normal behavior is to exclude executable continue.

Review: Cry Father

Title: Cry Father
Author: Benjamin Whitmer
Rating: ★ ★ ★
Publisher: Gallery Books
Copyright: 2014
Pages: 320
Keywords: thug lit
Reading period: late Jan­u­ary–ear­ly February, 2015

Patterson Wells lives dan­ger­ous­ly, clearing fallen trees in hurricane season. Since the death of his young son a few years ago, he’s been lost in a self-de­struc­tive fog. His life becomes entangled with that of his neighbor’s grown son, Junior, another lost soul. Wells and Junior bond after a fashion, as their lives spiral further out of control, with drug deals gone bad, drunken sprees, and murders.

Fas­ci­nat­ing in a grim can’t-look-away-from-the-trainwreck fashion. Whitmer writes lyrically about broken lives and disposable people.

Review: Blood Eye

Title: Blood Eye
Author: Giles Kristian
Rating: ★ ★ ★
Publisher: Bantam
Copyright: 2012
Pages: 448
Keywords: history
Reading period: early February, 2015

When the Norse raiders arrive in the English village, Raven, the young outsider who was found two years before with no memory, realizes that he speaks their language. He is drawn to them and he joins them in their quest for glory, plunder, and battle.

After a slow start, the plot moves along with enough fighting to hold one’s interest. Aside from Raven, the characters are poorly drawn, with little to dis­tin­guish or motivate them.

Review: Traitor's Blade

Title: Traitor’s Blade
Author: Sebastien de Castell
Rating: ★ ★ ★ ★
Publisher: Jo Fletcher Books
Copyright: 2014
Pages: 384
Keywords: fantasy
Reading period: late January, 2015

Five years ago, the Greatcoats were the lawgivers of Tristia. And then the good king was deposed by the dukes and the Greatcoats were broken up. Now despised, only a few are left, taking work as caravan guards and sellswords. Falcio, the former First Cantor, finally starts to care again, as he is sucked into the dukes’ intrigues.

Traitor’s Blade starts out light-hearted and joky, growing darker and more passionate as Falcio opens himself up and re­dis­cov­ers his honor. De Castell is a fine sto­ry­teller and the action continue.

Review: The Falls

Title: The Falls
Author: Ian Rankin
Rating: ★ ★ ★ ★
Publisher: Minotaur
Copyright: 2001
Pages: 480
Keywords: crime, fiction
Reading period: late January, 2015

A young woman from a prominent family is missing and the Edinburgh police are looking for her. In time, they find her body. A small wooden coffin is found near her home, and DI John Rebus links that to some cold cases, while DC Siobhan Clarke tracks down the mysterious Quizmaster on the Internet.

Another enjoyable and competent police procedural from Ian Rankin.

Review: A Long Long Way

Title: A Long Long Way
Author: Sebastian Barry
Rating: ★ ★ ★ ★ ½
Publisher: Penguin
Copyright: 2005
Pages: 304
Keywords: fiction, historical, Ireland, First World War
Reading period: 15–28 January, 2015

Willie Dunne is the innocent 18-year-old son of a senior Dublin policeman, who promptly joins the Royal Dublin Fusiliers when the First World War breaks out, along with thousands of other Irishmen. Their early optimism that the war will be over by Christmas 1914 is soon crushed as both sides get bogged down in the trench warfare of the Western Front. Four long, brutal years of stalemate in the killing fields of Flanders follow, and much of Willie’s regiment die during continue.

The TerraServer

I bought a 2TB external hard disk today. It’s about the size of a deck of cards, but thinner, and it cost me $95. Disk Utility says it has 2,000,397,884,928 bytes.

In 1998, I got to see more than three terabytes of disks in one system. At the time, a server with a 25GB disk was considered high capacity. The 3TB system occupied con­sid­er­ably more volume than a pack of cards. I don’t know what it cost but clearly it was tens if not hundreds of thousands of dollars.

At that time, I was a developer on the IIS team at Microsoft. I was the lead per­for­mance engineer for Microsoft’s web server continue.

Python Egg Cache

Every so often, one of our Bamboo builds would break thus:

pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  [Errno 17] File exists: '/home/bamboo/.python-eggs'

The Python egg cache directory is currently set to:

  /home/bamboo/.python-eggs

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

This occurred while trying to make use of PyCrypto.

After a little research, I decided that instead of installing PyCrypto as a zipped egg (as it does by default) into the build’s continue.

Utili-Key 6-in-1 Multi-Tool

When I posted a link to the new Leatherman Tread Bracelet on Facebook the other day, I mentioned that I had recently forfeited a little Swiss Army knife that I’d owned for 30 years at airport security. The Tread is a bracelet where each link has one or more mini-tools. The bracelet itself is about $150–$200, depending upon the exact tools. With a watch, it’s about $600.

While I can see the appeal, I have no intention of buying one. Jan mentioned in the comments that he carries a Utili-Key 6-in-1 Multi-Tool on his key ring, and he’s never had any problems with it at TSA check­points. Since it was continue.

Unseasonable January Weather

While the Northeast is being hammered with a major snowstorm, we’ve enjoyed some un­sea­son­ably warm weather in the Northwest. Yesterday, it was 63°F (17°C) in Seattle—a record high tem­per­a­ture. The flowers are blooming. I smelled some glorious blossoms yesterday and today. One friend dubbed it “sumter”.

Previous » « Next