import nose
from min_max_bad import min_max

def test_min_max_typical():
	assert min_max([6758, 678, 567, 5]) == (15, 6758) 
	assert min_max([-100, 678, 567, 5]) == (-100, 678) 


def min_max_empty():
	assert min_max([]) == None

def test_min_max_duplicates():
	assert min_max([1,1,1,1,1,1,1,1]) == (1,1)

def test_min_max_single_elt():
	out = min_max([1])
	assert out == (0,1), 'Input was [1], expected output was (0,1), actual output was %s' % str(out)
	
if __name__ == '__main__':
	nose.runmodule()