From 2612e5cd30fbba526ef5349b6150bc2d4ebff99f Mon Sep 17 00:00:00 2001 From: Nick Morrott Date: Sun, 11 Feb 2024 02:25:09 +0000 Subject: [PATCH] Rename nose-specific setup function Rename setup() to setUp() and add a tearDown() function in keeping with other unittest tests. --- tests/test_projecttemplate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_projecttemplate.py b/tests/test_projecttemplate.py index 83f01b1c..2e9cae51 100644 --- a/tests/test_projecttemplate.py +++ b/tests/test_projecttemplate.py @@ -17,14 +17,17 @@ from project_generator.project import Project, ProjectTemplate from project_generator.settings import ProjectSettings -class TestProjectTemplate: +class TestProjectTemplate(TestCase): - def setup(self): + def setUp(self): # set common and tool specific options self.project_dic = {} self.project_dic['common'] = ProjectTemplate().get_project_template() self.project_dic['tool_specific'] = ProjectTemplate().get_project_template() + def tearDown(self): + self.project_dic.clear() + def testDefaultCtor(self): assert self.project_dic['common']['name'] == 'Default' assert self.project_dic['common']['output_type'] == 'exe'