# Path: ish_parser/Minutes.py
# class Minutes(Observation):
#   ''' represents (obviously) minutes '''
#   MISSING = 9999
#   MINUTES_IN_HOUR = 60.00
# 
#   def __str__(self):
#     if int(self._obs_value) == self.MISSING:
#       return 'MISSING'
#     else:
#       return int(self._obs_value)
# 
#   def __eq__(self, other_value):
#     if int(self._obs_value) == other_value:
#       return True
#     else:
#       return False
# 
#   def get_hours(self):
#     if int(self._obs_value) == self.MISSING:
#       return 'MISSING'
#     else:
#       return self._obs_value / self.MINUTES_IN_HOUR


from ish_parser import Minutes
import unittest

class Minutes_test(unittest.TestCase):
  
  def test_simple(self):
    minutes = 9999
    self.assertEqual(str(Minutes(minutes)), 'MISSING')

  def test_hours_conversion(self):
    ''' just do some simple verification that we convert properly
    minutes to the right number of hours'''

# Path: ish_parser/Minutes.py
# class Minutes(Observation):
#   ''' represents (obviously) minutes '''
#   MISSING = 9999
#   MINUTES_IN_HOUR = 60.00
# 
#   def __str__(self):
#     if int(self._obs_value) == self.MISSING:
#       return 'MISSING'
#     else:
#       return int(self._obs_value)
# 
#   def __eq__(self, other_value):
#     if int(self._obs_value) == other_value:
#       return True
#     else:
#       return False
# 
#   def get_hours(self):
#     if int(self._obs_value) == self.MISSING:
#       return 'MISSING'
#     else:
#       return self._obs_value / self.MINUTES_IN_HOUR


# Path: tests/Minutes_test.py
from ish_parser import Minutes
import unittest


class Minutes_test(unittest.TestCase):
  
  def test_simple(self):
    minutes = 9999
    self.assertEqual(str(Minutes(minutes)), 'MISSING')

  def test_hours_conversion(self):
    ''' just do some simple verification that we convert properly
    minutes to the right number of hours'''

    self.assertEqual(Minutes(60).get_hours(), 1)