Skip to content

Commit

Permalink
Rename nose-specific setup function
Browse files Browse the repository at this point in the history
Rename setup() to setUp() and add a tearDown() function in keeping
with other unittest tests.
  • Loading branch information
knowledgejunkie committed Feb 11, 2024
1 parent d89bf55 commit 2612e5c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_projecttemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 2612e5c

Please sign in to comment.