Skip to content

Commit

Permalink
Flake8.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Feb 22, 2012
1 parent 000849c commit 9ac9c23
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,33 @@
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.')


0 comments on commit 9ac9c23

Please sign in to comment.