Commit 2f6fc405 authored by Chris Toshok's avatar Chris Toshok

add a small test (based on fasta.py)

parent 9c1e684b
import sys
import hashlib
class HashOutput:
def __init__(self):
self.m = hashlib.md5()
def write(self, string):
self.m.update(string)
def md5hash(self):
return self.m.hexdigest()
hash_output = HashOutput()
old_stdout = sys.stdout
sys.stdout = hash_output
print "Hello World!"
sys.stdout = old_stdout
print hash_output.md5hash()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment