# <auto-generated>
# This code was generated by the UnitCodeGenerator tool
#
# Changes to this file will be lost if the code is regenerated
# </auto-generated>

import unittest
import units.volume.fluid_ounces

class TestFluidOuncesMethods(unittest.TestCase):

	def test_convert_known_fluid_ounces_to_millilitres(self):
		self.assertAlmostEqual(340.957, units.volume.fluid_ounces.to_millilitres(12.0), places=1)
		self.assertAlmostEqual(170.7625, units.volume.fluid_ounces.to_millilitres(6.01), places=1)
		self.assertAlmostEqual(22.16219, units.volume.fluid_ounces.to_millilitres(0.78), places=1)

	def test_convert_known_fluid_ounces_to_litres(self):
		self.assertAlmostEqual(22.7305, units.volume.fluid_ounces.to_litres(800.0), places=1)
		self.assertAlmostEqual(0.127859, units.volume.fluid_ounces.to_litres(4.5), places=1)
		self.assertAlmostEqual(3.09702, units.volume.fluid_ounces.to_litres(109.0), places=1)

	def test_convert_known_fluid_ounces_to_kilolitres(self):
		self.assertAlmostEqual(1.616959, units.volume.fluid_ounces.to_kilolitres(56909.0), places=1)
		self.assertAlmostEqual(0.2559733, units.volume.fluid_ounces.to_kilolitres(9009.0), places=1)
		self.assertAlmostEqual(3.50776304, units.volume.fluid_ounces.to_kilolitres(123456.0), places=1)

	def test_convert_known_fluid_ounces_to_teaspoons(self):
		self.assertAlmostEqual(590.4, units.volume.fluid_ounces.to_teaspoons(123.0), places=1)
		self.assertAlmostEqual(43.77598, units.volume.fluid_ounces.to_teaspoons(9.12), places=1)
		self.assertAlmostEqual(0.96, units.volume.fluid_ounces.to_teaspoons(0.2), places=1)

	def test_convert_known_fluid_ounces_to_tablespoons(self):
		self.assertAlmostEqual(11.2, units.volume.fluid_ounces.to_tablespoons(7.0), places=1)
		self.assertAlmostEqual(264.63989, units.volume.fluid_ounces.to_tablespoons(165.4), places=1)
		self.assertAlmostEqual(128.1599, units.volume.fluid_ounces.to_tablespoons(80.1), places=1)

	def test_convert_known_fluid_ounces_to_quarts(self):
		self.assertAlmostEqual(2.225, units.volume.fluid_ounces.to_quarts(89.0), places=1)
		self.assertAlmostEqual(0.1475, units.volume.fluid_ounces.to_quarts(5.9), places=1)
		self.assertAlmostEqual(32.5, units.volume.fluid_ounces.to_quarts(1300.0), places=1)

	def test_convert_known_fluid_ounces_to_pints(self):
		self.assertAlmostEqual(65.0, units.volume.fluid_ounces.to_pints(1300.0), places=1)
		self.assertAlmostEqual(0.285, units.volume.fluid_ounces.to_pints(5.7), places=1)
		self.assertAlmostEqual(95.0, units.volume.fluid_ounces.to_pints(1900.0), places=1)

	def test_convert_known_fluid_ounces_to_gallons(self):
		self.assertAlmostEqual(11.875, units.volume.fluid_ounces.to_gallons(1900.0), places=1)
		self.assertAlmostEqual(0.035, units.volume.fluid_ounces.to_gallons(5.6), places=1)
		self.assertAlmostEqual(77.15625, units.volume.fluid_ounces.to_gallons(12345.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_teaspoons(self):
		self.assertAlmostEqual(71163.512, units.volume.fluid_ounces.to_u_s_teaspoons(12345.0), places=1)
		self.assertAlmostEqual(51.3046, units.volume.fluid_ounces.to_u_s_teaspoons(8.9), places=1)
		self.assertAlmostEqual(0.028822808, units.volume.fluid_ounces.to_u_s_teaspoons(0.005), places=1)

	def test_convert_known_fluid_ounces_to_u_s_tablespoons(self):
		self.assertAlmostEqual(365.089, units.volume.fluid_ounces.to_u_s_tablespoons(190.0), places=1)
		self.assertAlmostEqual(13.0663, units.volume.fluid_ounces.to_u_s_tablespoons(6.8), places=1)
		self.assertAlmostEqual(4496.357, units.volume.fluid_ounces.to_u_s_tablespoons(2340.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_quarts(self):
		self.assertAlmostEqual(1.35107, units.volume.fluid_ounces.to_u_s_quarts(45.0), places=1)
		self.assertAlmostEqual(32.72589, units.volume.fluid_ounces.to_u_s_quarts(1090.0), places=1)
		self.assertAlmostEqual(23.3285, units.volume.fluid_ounces.to_u_s_quarts(777.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_pints(self):
		self.assertAlmostEqual(40.7122, units.volume.fluid_ounces.to_u_s_pints(678.0), places=1)
		self.assertAlmostEqual(0.270214, units.volume.fluid_ounces.to_u_s_pints(4.5), places=1)
		self.assertAlmostEqual(114.0902, units.volume.fluid_ounces.to_u_s_pints(1900.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_gallons(self):
		self.assertAlmostEqual(14.18622, units.volume.fluid_ounces.to_u_s_gallons(1890.0), places=1)
		self.assertAlmostEqual(0.0435344, units.volume.fluid_ounces.to_u_s_gallons(5.8), places=1)
		self.assertAlmostEqual(75.734905, units.volume.fluid_ounces.to_u_s_gallons(10090.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_fluid_ounces(self):
		self.assertAlmostEqual(182.544, units.volume.fluid_ounces.to_u_s_fluid_ounces(190.0), places=1)
		self.assertAlmostEqual(52.64964, units.volume.fluid_ounces.to_u_s_fluid_ounces(54.8), places=1)
		self.assertAlmostEqual(1.63329, units.volume.fluid_ounces.to_u_s_fluid_ounces(1.7), places=1)

	def test_convert_known_fluid_ounces_to_u_s_cups(self):
		self.assertAlmostEqual(0.72057, units.volume.fluid_ounces.to_u_s_cups(6.0), places=1)
		self.assertAlmostEqual(216.171, units.volume.fluid_ounces.to_u_s_cups(1800.0), places=1)
		self.assertAlmostEqual(0.828655, units.volume.fluid_ounces.to_u_s_cups(6.9), places=1)

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

# <auto-generated>
# This code was generated by the UnitCodeGenerator tool
#
# Changes to this file will be lost if the code is regenerated
# </auto-generated>

import unittest
import units.volume.fluid_ounces

class TestFluidOuncesMethods(unittest.TestCase):

	def test_convert_known_fluid_ounces_to_millilitres(self):
		self.assertAlmostEqual(340.957, units.volume.fluid_ounces.to_millilitres(12.0), places=1)
		self.assertAlmostEqual(170.7625, units.volume.fluid_ounces.to_millilitres(6.01), places=1)
		self.assertAlmostEqual(22.16219, units.volume.fluid_ounces.to_millilitres(0.78), places=1)

	def test_convert_known_fluid_ounces_to_litres(self):
		self.assertAlmostEqual(22.7305, units.volume.fluid_ounces.to_litres(800.0), places=1)
		self.assertAlmostEqual(0.127859, units.volume.fluid_ounces.to_litres(4.5), places=1)
		self.assertAlmostEqual(3.09702, units.volume.fluid_ounces.to_litres(109.0), places=1)

	def test_convert_known_fluid_ounces_to_kilolitres(self):
		self.assertAlmostEqual(1.616959, units.volume.fluid_ounces.to_kilolitres(56909.0), places=1)
		self.assertAlmostEqual(0.2559733, units.volume.fluid_ounces.to_kilolitres(9009.0), places=1)
		self.assertAlmostEqual(3.50776304, units.volume.fluid_ounces.to_kilolitres(123456.0), places=1)

	def test_convert_known_fluid_ounces_to_teaspoons(self):
		self.assertAlmostEqual(590.4, units.volume.fluid_ounces.to_teaspoons(123.0), places=1)
		self.assertAlmostEqual(43.77598, units.volume.fluid_ounces.to_teaspoons(9.12), places=1)
		self.assertAlmostEqual(0.96, units.volume.fluid_ounces.to_teaspoons(0.2), places=1)

	def test_convert_known_fluid_ounces_to_tablespoons(self):
		self.assertAlmostEqual(11.2, units.volume.fluid_ounces.to_tablespoons(7.0), places=1)
		self.assertAlmostEqual(264.63989, units.volume.fluid_ounces.to_tablespoons(165.4), places=1)
		self.assertAlmostEqual(128.1599, units.volume.fluid_ounces.to_tablespoons(80.1), places=1)

	def test_convert_known_fluid_ounces_to_quarts(self):
		self.assertAlmostEqual(2.225, units.volume.fluid_ounces.to_quarts(89.0), places=1)
		self.assertAlmostEqual(0.1475, units.volume.fluid_ounces.to_quarts(5.9), places=1)
		self.assertAlmostEqual(32.5, units.volume.fluid_ounces.to_quarts(1300.0), places=1)

	def test_convert_known_fluid_ounces_to_pints(self):
		self.assertAlmostEqual(65.0, units.volume.fluid_ounces.to_pints(1300.0), places=1)
		self.assertAlmostEqual(0.285, units.volume.fluid_ounces.to_pints(5.7), places=1)
		self.assertAlmostEqual(95.0, units.volume.fluid_ounces.to_pints(1900.0), places=1)

	def test_convert_known_fluid_ounces_to_gallons(self):
		self.assertAlmostEqual(11.875, units.volume.fluid_ounces.to_gallons(1900.0), places=1)
		self.assertAlmostEqual(0.035, units.volume.fluid_ounces.to_gallons(5.6), places=1)
		self.assertAlmostEqual(77.15625, units.volume.fluid_ounces.to_gallons(12345.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_teaspoons(self):
		self.assertAlmostEqual(71163.512, units.volume.fluid_ounces.to_u_s_teaspoons(12345.0), places=1)
		self.assertAlmostEqual(51.3046, units.volume.fluid_ounces.to_u_s_teaspoons(8.9), places=1)
		self.assertAlmostEqual(0.028822808, units.volume.fluid_ounces.to_u_s_teaspoons(0.005), places=1)

	def test_convert_known_fluid_ounces_to_u_s_tablespoons(self):
		self.assertAlmostEqual(365.089, units.volume.fluid_ounces.to_u_s_tablespoons(190.0), places=1)
		self.assertAlmostEqual(13.0663, units.volume.fluid_ounces.to_u_s_tablespoons(6.8), places=1)
		self.assertAlmostEqual(4496.357, units.volume.fluid_ounces.to_u_s_tablespoons(2340.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_quarts(self):
		self.assertAlmostEqual(1.35107, units.volume.fluid_ounces.to_u_s_quarts(45.0), places=1)
		self.assertAlmostEqual(32.72589, units.volume.fluid_ounces.to_u_s_quarts(1090.0), places=1)
		self.assertAlmostEqual(23.3285, units.volume.fluid_ounces.to_u_s_quarts(777.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_pints(self):
		self.assertAlmostEqual(40.7122, units.volume.fluid_ounces.to_u_s_pints(678.0), places=1)
		self.assertAlmostEqual(0.270214, units.volume.fluid_ounces.to_u_s_pints(4.5), places=1)
		self.assertAlmostEqual(114.0902, units.volume.fluid_ounces.to_u_s_pints(1900.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_gallons(self):
		self.assertAlmostEqual(14.18622, units.volume.fluid_ounces.to_u_s_gallons(1890.0), places=1)
		self.assertAlmostEqual(0.0435344, units.volume.fluid_ounces.to_u_s_gallons(5.8), places=1)
		self.assertAlmostEqual(75.734905, units.volume.fluid_ounces.to_u_s_gallons(10090.0), places=1)

	def test_convert_known_fluid_ounces_to_u_s_fluid_ounces(self):
		self.assertAlmostEqual(182.544, units.volume.fluid_ounces.to_u_s_fluid_ounces(190.0), places=1)
		self.assertAlmostEqual(52.64964, units.volume.fluid_ounces.to_u_s_fluid_ounces(54.8), places=1)
		self.assertAlmostEqual(1.63329, units.volume.fluid_ounces.to_u_s_fluid_ounces(1.7), places=1)

	def test_convert_known_fluid_ounces_to_u_s_cups(self):
		self.assertAlmostEqual(0.72057, units.volume.fluid_ounces.to_u_s_cups(6.0), places=1)
		self.assertAlmostEqual(216.171, units.volume.fluid_ounces.to_u_s_cups(1800.0), places=1)
		self.assertAlmostEqual(0.828655, units.volume.fluid_ounces.to_u_s_cups(6.9), places=1)

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

# <auto-generated> # This code was generated by the UnitCodeGenerator tool # # Changes to this file will be lost if the code is regenerated # </auto-generated>