Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve testsuite validation #389

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

Pog3k
Copy link
Contributor

@Pog3k Pog3k commented Oct 9, 2023

Improve testsuite validation.

If test files are sleceted in child folders child folders must have an init file.
Support check for nested child folders.

Print error when init file is missing

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #389 (f153efa) into master (7931724) will increase coverage by 0.01%.
Report is 10 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #389      +/-   ##
==========================================
+ Coverage   97.09%   97.11%   +0.01%     
==========================================
  Files          85       85              
  Lines        6824     6853      +29     
==========================================
+ Hits         6626     6655      +29     
  Misses        198      198              
Files Coverage Δ
src/pykiso/test_coordinator/test_execution.py 99.04% <100.00%> (+0.14%) ⬆️

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -36,3 +36,12 @@ repos:
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/codespell-project/codespell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

file_paths and all([VALID_MODULE_NAME.match(file.name) for file in file_paths])
)
# Check that all sub folders of a nested testsuite have an __init__.py file
testsuite_folders = {filepath.parent for filepath in test_files_found}
Copy link
Contributor

@sebclrsn sebclrsn Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be easier to directly gather all parent folders of the different files within a set?
all_parent_folders = set(parent for file in test_files_found for parent in file.parents)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need those folders between.. i have seen users who nested testsuite folders and then every folder needs to be a module

@sebastianpfischer
Copy link
Contributor

Is there anything to add in What's new section?

@sebclrsn sebclrsn self-requested a review October 11, 2023 13:48
@Pog3k Pog3k merged commit 0182849 into master Oct 11, 2023
6 checks passed
@Pog3k Pog3k deleted the feature/improve_testuite_validation branch October 11, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants