Skip to content

Commit

Permalink
tests/unit: add @staticmethod decorator to static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Dec 30, 2021
1 parent dad7f06 commit 99497e7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/unit/Design.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def test_Files(self):


class Validate(TestCase):
def test_Design(self):
@staticmethod
def test_Design():
project = Project("project", rootDirectory=Path("tests/project"))
design = Design("design", directory=Path("designA"), project=project)

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/File.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def test_ResolveDirectory(self):


class Validate(TestCase):
def test_File(self):
@staticmethod
def test_File():
project = Project("project", rootDirectory=Path("tests/project"))
design = Design("design", directory=Path("designA"), project=project)
fileSet = FileSet("fileset", design=design)
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/FileSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ def test_SourceFile(self):


class Validate(TestCase):
def test_FileSet(self):
@staticmethod
def test_FileSet():
project = Project("project", rootDirectory=Path("tests/project"))
design = Design("design", directory=Path("designA"), project=project)
fileSet = FileSet("fileset", design=design)
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/Files.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def test_GetVersionFromFileSet(self):

self.assertEqual(vhdlVersion, file.VHDLVersion)

def test_Validate(self):
@staticmethod
def test_Validate():
project = Project("project", rootDirectory=Path("tests/project"), vhdlVersion=VHDLVersion.VHDL2019)
design = Design("design", directory=Path("designA"), project=project)
vhdlLibrary = VHDLLibrary("library", design=design)
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/Project.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def test_ResolveDirectory(self):


class Validate(TestCase):
def test_Project(self):
@staticmethod
def test_Project():
project = Project("project", rootDirectory=Path("tests/project"))

project.Validate()

0 comments on commit 99497e7

Please sign in to comment.