# Path: brew/cli/gravity_volume.py
# def get_parser():
#     parser = argparse.ArgumentParser(description=u"Gravity-Volume Conversion")
#     parser.add_argument(
#         u"-o",
#         u"--original-volume",
#         metavar=u"V",
#         type=float,
#         required=True,
#         help=u"Original Volume",
#     )
#     parser.add_argument(
#         u"-f",
#         u"--final-volume",
#         metavar=u"V",
#         type=float,
#         required=True,
#         help=u"Final Volume",
#     )
#     parser.add_argument(
#         u"-g", u"--gravity", metavar=u"G", type=float, required=True, help=u"Gravity"
#     )
#     return parser
# 
# Path: brew/cli/gravity_volume.py
# def get_gravity(original_volume, final_volume, gravity):
#     """
#     Convert gravity at original volume to gravity at final volume
#     """
#     return gu_to_sg(sg_to_gu(gravity) * original_volume / final_volume)
# 
# Path: brew/cli/gravity_volume.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 not all([args.original_volume, args.final_volume, args.gravity]):
#         print("Please provide all arguments")
#         sys.exit(1)
#     out = get_gravity(args.original_volume, args.final_volume, args.gravity)
#     print("{:0.3f}".format(out))


import unittest
from brew.cli.gravity_volume import get_parser
from brew.cli.gravity_volume import get_gravity
from brew.cli.gravity_volume import main
# -*- coding: utf-8 -*-



class TestCliTemp(unittest.TestCase):
    def setUp(self):
        self.ov = 3
        self.fv = 10
        self.gravity = 1.050

    def test_get_gravity(self):

# Path: brew/cli/gravity_volume.py
# def get_parser():
#     parser = argparse.ArgumentParser(description=u"Gravity-Volume Conversion")
#     parser.add_argument(
#         u"-o",
#         u"--original-volume",
#         metavar=u"V",
#         type=float,
#         required=True,
#         help=u"Original Volume",
#     )
#     parser.add_argument(
#         u"-f",
#         u"--final-volume",
#         metavar=u"V",
#         type=float,
#         required=True,
#         help=u"Final Volume",
#     )
#     parser.add_argument(
#         u"-g", u"--gravity", metavar=u"G", type=float, required=True, help=u"Gravity"
#     )
#     return parser
# 
# Path: brew/cli/gravity_volume.py
# def get_gravity(original_volume, final_volume, gravity):
#     """
#     Convert gravity at original volume to gravity at final volume
#     """
#     return gu_to_sg(sg_to_gu(gravity) * original_volume / final_volume)
# 
# Path: brew/cli/gravity_volume.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 not all([args.original_volume, args.final_volume, args.gravity]):
#         print("Please provide all arguments")
#         sys.exit(1)
#     out = get_gravity(args.original_volume, args.final_volume, args.gravity)
#     print("{:0.3f}".format(out))


# Path: tests/test_cli_gravity_volume.py
import unittest
from brew.cli.gravity_volume import get_parser
from brew.cli.gravity_volume import get_gravity
from brew.cli.gravity_volume import main

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



class TestCliTemp(unittest.TestCase):
    def setUp(self):
        self.ov = 3
        self.fv = 10
        self.gravity = 1.050

    def test_get_gravity(self):

        out = get_gravity(self.ov, self.fv, self.gravity)