def test_units(self): indata = 'm' vdesc = VariableDesc('x', attributes={'units': indata}) actual = vdesc.units() expected = indata print_test_message('VariableDesc.units()', indata=indata, actual=actual, expected=expected) self.assertEqual(actual, expected, 'Default VariableDesc.units() not {}'.format(indata))
def test_units_default(self): vdesc = VariableDesc("x") actual = vdesc.units() expected = None print_test_message( "VariableDesc.units() == nounit", actual=actual, expected=expected ) self.assertEqual(actual, expected, "Default VariableDesc.units() not None")
def test_units_default(self): vdesc = VariableDesc('x') actual = vdesc.units() expected = None print_test_message('VariableDesc.units() == nounit', actual=actual, expected=expected) self.assertEqual(actual, expected, 'Default VariableDesc.units() not None')
def test_units(self): indata = "m" vdesc = VariableDesc("x", attributes={"units": indata}) actual = vdesc.units() expected = indata print_test_message( "VariableDesc.units()", indata=indata, actual=actual, expected=expected ) self.assertEqual( actual, expected, "Default VariableDesc.units() not {}".format(indata) )