Skip to content

Commit

Permalink
Add review notes (#10)
Browse files Browse the repository at this point in the history
- enhance imports for testguide_report_generator package
- remove imports in tests init files
- combine imports in example file
  • Loading branch information
MarioFuchsTT committed Sep 10, 2024
1 parent 0d24ab3 commit 9a7f4cb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 98 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,8 @@ In the end, the report generator will take the assembled *TestSuite* and generat
A small example may look like this:

```
# import necessary classes for the TestSuite creation
from testguide_report_generator import TestSuite
from testguide_report_generator import TestCase, Verdict
# import the .json generator
from testguide_report_generator import Generator
# import necessary classes for the TestSuite creation and the .json generator
from testguide_report_generator import TestSuite, TestCase, Verdict, Generator
def create_testsuite():
Expand Down
7 changes: 2 additions & 5 deletions example_TestSuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
Example Script.
"""

from testguide_report_generator import TestSuite
from testguide_report_generator import TestCase, TestStep, TestStepFolder, Verdict, Parameter, \
Direction, Review, TestStepArtifactType
from testguide_report_generator import TestCaseFolder
from testguide_report_generator import Generator
from testguide_report_generator import TestSuite, TestCase, TestStep, TestStepFolder, Verdict, Parameter, \
Direction, Review, TestStepArtifactType, TestCaseFolder, Generator


def create_testsuite():
Expand Down
9 changes: 6 additions & 3 deletions testguide_report_generator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# SPDX-License-Identifier: MIT

"""
This module provides essential imports for the testguide_report_generator root package.
This module provides essential imports for the testguide_report_generator package.
"""

from testguide_report_generator.ReportGenerator import Generator
from .ReportGenerator import Generator
from .model.TestSuite import TestSuite
from .model.TestCase import TestCase, TestStep, TestStepFolder, Verdict, Parameter, \
Direction, Review, TestStepArtifactType
Direction, Review, TestStepArtifactType, Artifact, TestStepArtifact, Attribute
from .model.TestCaseFolder import TestCaseFolder
from .util.JsonValidator import JsonValidator

Expand All @@ -24,6 +24,9 @@
"Direction",
"Review",
"TestStepArtifactType",
"Artifact",
"TestStepArtifact",
"Attribute",
"TestCaseFolder",
"JsonValidator"
]
18 changes: 0 additions & 18 deletions testguide_report_generator/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
# Copyright (c) 2023-2024 tracetronic GmbH
#
# SPDX-License-Identifier: MIT

"""
This module provides essential imports for the testguide_report_generator model package.
"""

from testguide_report_generator.util.Json2AtxRepr import Json2AtxRepr
from testguide_report_generator.util.File import get_md5_hash_from_file
from testguide_report_generator.util.ValidityChecks import check_name_length, gen_error_msg, validate_new_teststep, \
validate_testcase

__all__ = [
"Json2AtxRepr",
"get_md5_hash_from_file",
"check_name_length",
"gen_error_msg",
"validate_new_teststep",
"validate_testcase"
]
21 changes: 0 additions & 21 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
# Copyright (c) 2023-2024 tracetronic GmbH
#
# SPDX-License-Identifier: MIT

"""
This module provides essential imports for the tests root package.
"""

from testguide_report_generator.model.TestCase import TestCase, Verdict
from testguide_report_generator.model.TestCaseFolder import TestCaseFolder
from testguide_report_generator.model.TestSuite import TestSuite
from testguide_report_generator.util.JsonValidator import JsonValidator
from testguide_report_generator.ReportGenerator import Generator
from testguide_report_generator.util.File import get_md5_hash_from_file

__all__ = [
"TestCase",
"Verdict",
"TestCaseFolder",
"TestSuite",
"JsonValidator",
"Generator",
"get_md5_hash_from_file"
]
20 changes: 0 additions & 20 deletions tests/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# Copyright (c) 2023-2024 tracetronic GmbH
#
# SPDX-License-Identifier: MIT

"""
This module provides essential imports for the tests model package.
"""

from testguide_report_generator.model.TestCase import (TestCase, TestStep, Verdict, Artifact, TestStepArtifact,
TestStepArtifactType)
from testguide_report_generator.model.TestSuite import TestSuite
from testguide_report_generator.util.ValidityChecks import gen_error_msg

__all__ = [
"TestCase",
"TestStep",
"Verdict",
"Artifact",
"TestStepArtifact",
"TestStepArtifactType",
"TestSuite",
"gen_error_msg"
]
25 changes: 0 additions & 25 deletions tests/util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
# Copyright (c) 2023-2024 tracetronic GmbH
#
# SPDX-License-Identifier: MIT

"""
This module provides essential imports for the tests util package.
"""

from testguide_report_generator.model.TestCase import TestCase, TestStep, TestStepFolder
from testguide_report_generator.model.TestCaseFolder import TestCaseFolder
from testguide_report_generator.util.File import get_extended_windows_path, get_md5_hash_from_file
from testguide_report_generator.util.JsonValidator import JsonValidator
from testguide_report_generator.util.ValidityChecks import gen_error_msg, check_name_length, validate_new_teststep, \
validate_testcase

__all__ = [
"TestCase",
"TestStep",
"TestStepFolder",
"TestCaseFolder",
"get_extended_windows_path",
"get_md5_hash_from_file",
"JsonValidator",
"gen_error_msg",
"check_name_length",
"validate_new_teststep",
"validate_testcase"
]

0 comments on commit 9a7f4cb

Please sign in to comment.