def test_write_yaml(self): """Test write_yaml() for Table.""" test_table = Table("Some Table") test_variable = Variable("Some Variable") test_table.add_variable(test_variable) try: test_table.write_yaml("test_output") except TypeError: self.fail("Table.write_yaml raised an unexpected TypeError.") with self.assertRaises(TypeError): test_table.write_yaml(None)
def test_write_yaml(self): """Test write_yaml() for Table.""" test_table = Table("Some Table") test_variable = Variable("Some Variable") test_table.add_variable(test_variable) testdir = tmp_directory_name() self.addCleanup(shutil.rmtree, testdir) try: test_table.write_yaml(testdir) except TypeError: self.fail("Table.write_yaml raised an unexpected TypeError.") with self.assertRaises(TypeError): test_table.write_yaml(None) self.doCleanups()