Source

data_munging_code_kata / tests.py

Full commit
import unittest
from weather.temp_spread import TemperatureSpread
from soccer.goals_spread import GoalSpread
from kutil import dry



class TestWeather(unittest.TestCase):

		
	def test_spread(self):
		t_spread = TemperatureSpread()
		day_min_diff = t_spread.eval_spread()
		self.assertTrue(day_min_diff)
		self.assertTrue(day_min_diff > 0)
		
		
class TestSoccer(unittest.TestCase):

	def test_spread(self):
		s_spread = GoalSpread()
		goals_min_diff = s_spread.eval_spread()
		self.assertTrue(goals_min_diff)
		self.assertTrue(goals_min_diff > 0)
		
class TestDry(unittest.TestCase):
	
	def test_load_file(self):
		file = dry.load_file('./data/weather.dat')
		self.assertTrue(file)
		
		
		
		
		
	


if __name__ == '__main__':
    unittest.main()