From 9ac9c234126cddece2fb92a4b419d6a9c16624c7 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 22 Feb 2012 17:39:14 +0100 Subject: [PATCH] Flake8. --- tests/fixtures.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/fixtures.py b/tests/fixtures.py index 917073a0..15dbd127 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -3,30 +3,33 @@ This file contains all jobs that are used in tests. Each of these test fixtures has a slighty different characteristics. """ + def say_hello(name=None): """A job with a single argument and a return value.""" if name is None: name = 'Stranger' return 'Hi there, %s!' % (name,) + def do_nothing(): """The best job in the world.""" pass + def div_by_zero(x): """Prepare for a division-by-zero exception.""" return x / 0 + def some_calculation(x, y, z=1): """Some arbitrary calculation with three numbers. Choose z smartly if you want a division by zero exception. """ return x * y / z + def create_file(path): """Creates a file at the given path. Actually, leaves evidence that the job ran.""" with open(path, 'w') as f: f.write('Just a sentinel.') - -