# Path: brew/cli/temp.py
# def get_parser():
#     parser = argparse.ArgumentParser(description=u"Temperature Conversion")
#     parser.add_argument(
#         u"-c", u"--celsius", metavar=u"C", type=float, help=u"Temperature in Celsius"
#     )
#     parser.add_argument(
#         u"-f",
#         u"--fahrenheit",
#         metavar=u"F",
#         type=float,
#         help=u"Temperature in Fahrenheit",
#     )
#     return parser
# 
# Path: brew/cli/temp.py
# def get_temp_conversion(fahrenheit, celsius):
#     """
#     Convert temperature between fahrenheit and celsius
#     """
#     if fahrenheit:
#         return round(fahrenheit_to_celsius(fahrenheit), 1)
#     elif celsius:
#         return round(celsius_to_fahrenheit(celsius), 1)
# 
# Path: brew/cli/temp.py
# def main(parser_fn=get_parser, parser_kwargs=None):
#     parser = None
#     if not parser_kwargs:
#         parser = parser_fn()
#     else:
#         parser = parser_fn(**parser_kwargs)
#     args = parser.parse_args()
#     if args.fahrenheit and args.celsius:
#         print(u"Must provide only one of Fahrenheit or Celsius")
#         sys.exit(1)
#     elif not (args.fahrenheit or args.celsius):
#         print(u"Must provide one of Fahrenheit or Celsius")
#         sys.exit(1)
#     out = get_temp_conversion(args.fahrenheit, args.celsius)
#     print(out)


import unittest
from brew.cli.temp import get_parser
from brew.cli.temp import get_temp_conversion
from brew.cli.temp import main
# -*- coding: utf-8 -*-



class TestCliTemp(unittest.TestCase):
    def setUp(self):
        self.c = 15.6
        self.f = 60.1

    def test_get_sugar_conversion_fahrenheit(self):
        out = get_temp_conversion(self.f, None)
        self.assertEquals(out, self.c)

    def test_get_sugar_conversion_celsius(self):

# Path: brew/cli/temp.py
# def get_parser():
#     parser = argparse.ArgumentParser(description=u"Temperature Conversion")
#     parser.add_argument(
#         u"-c", u"--celsius", metavar=u"C", type=float, help=u"Temperature in Celsius"
#     )
#     parser.add_argument(
#         u"-f",
#         u"--fahrenheit",
#         metavar=u"F",
#         type=float,
#         help=u"Temperature in Fahrenheit",
#     )
#     return parser
# 
# Path: brew/cli/temp.py
# def get_temp_conversion(fahrenheit, celsius):
#     """
#     Convert temperature between fahrenheit and celsius
#     """
#     if fahrenheit:
#         return round(fahrenheit_to_celsius(fahrenheit), 1)
#     elif celsius:
#         return round(celsius_to_fahrenheit(celsius), 1)
# 
# Path: brew/cli/temp.py
# def main(parser_fn=get_parser, parser_kwargs=None):
#     parser = None
#     if not parser_kwargs:
#         parser = parser_fn()
#     else:
#         parser = parser_fn(**parser_kwargs)
#     args = parser.parse_args()
#     if args.fahrenheit and args.celsius:
#         print(u"Must provide only one of Fahrenheit or Celsius")
#         sys.exit(1)
#     elif not (args.fahrenheit or args.celsius):
#         print(u"Must provide one of Fahrenheit or Celsius")
#         sys.exit(1)
#     out = get_temp_conversion(args.fahrenheit, args.celsius)
#     print(out)


# Path: tests/test_cli_temp.py
import unittest
from brew.cli.temp import get_parser
from brew.cli.temp import get_temp_conversion
from brew.cli.temp import main

# -*- coding: utf-8 -*-



class TestCliTemp(unittest.TestCase):
    def setUp(self):
        self.c = 15.6
        self.f = 60.1

    def test_get_sugar_conversion_fahrenheit(self):
        out = get_temp_conversion(self.f, None)
        self.assertEquals(out, self.c)

    def test_get_sugar_conversion_celsius(self):

        out = get_temp_conversion(None, self.c)