Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
73a7233
Create common lib
furtib Aug 15, 2025
664914f
Make unit a package
furtib Aug 15, 2025
2d5a753
Remove unnecessary
furtib Aug 15, 2025
209f01a
Add logging to base class
furtib Aug 15, 2025
d66e804
Edit comment
furtib Aug 15, 2025
c3ebf7e
Add readme, how to add tests
furtib Aug 15, 2025
7f7af80
Fix a couple mistakes
furtib Aug 15, 2025
75e6e65
Extend readme with BUILD file instructions
furtib Aug 15, 2025
6502650
Remove whitespace
furtib Aug 15, 2025
9aa9ab8
Add __init__.py
furtib Aug 15, 2025
982ff23
Add warnings for execution path
furtib Aug 15, 2025
6eef54d
Add test template file
furtib Aug 15, 2025
9ad69c5
Add param for passing working directory
furtib Aug 15, 2025
92efa45
Add warning for current working directory change
furtib Aug 15, 2025
6c791e8
Add current dir const to template
furtib Aug 15, 2025
e4816ba
Update template to run as test
furtib Aug 15, 2025
90e3c74
Fix path problems
furtib Aug 18, 2025
4588e05
Add linefeed
furtib Aug 18, 2025
8397ae5
Add way to pass path to base class, move folder change before environ…
furtib Aug 18, 2025
72c23ec
Format
furtib Aug 18, 2025
0444c7b
Edit to new path setting
furtib Aug 18, 2025
a39b2f8
Remove warnings
furtib Aug 18, 2025
4a4164b
Fix warning
furtib Aug 18, 2025
66af78f
Change comment
furtib Aug 18, 2025
80674ab
Move template into unittest folder
furtib Aug 18, 2025
9b8778f
Update README
furtib Aug 18, 2025
624d466
Change template place
furtib Aug 18, 2025
696f8ef
Add license header
furtib Aug 18, 2025
8e98a4c
Add explanation to __init__.py
furtib Aug 18, 2025
98ef377
Enforce setting __test_path__ BAZEL_BIN_DIR and BAZEL_TESTLOGS_DIR
furtib Aug 18, 2025
28bf71b
Rewrite check command to act more like run_command
furtib Aug 18, 2025
2d170dc
Update comment
furtib Aug 18, 2025
3ae1711
Revert "Move template into unittest folder"
furtib Aug 19, 2025
2054666
Revert "Change template place"
furtib Aug 19, 2025
cee4d66
Add setup, teardown to subclass
furtib Aug 19, 2025
f59eb15
Add comments, and teardown method
furtib Aug 19, 2025
a02e792
Edit grep to not cause fail
furtib Aug 19, 2025
b167950
Move clean command to only run once per suite
furtib Aug 19, 2025
217dc53
Change run command to class method
furtib Aug 19, 2025
468fdd9
Add typing
furtib Aug 21, 2025
8cc0436
Create constains_regex_in_files
furtib Aug 21, 2025
acf7f54
change it so contains regex works for only one file and gives back bo…
furtib Aug 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/unit/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,15 @@ def grep_file(self, filename, regex):
logging.debug(line)
results.append(line)
return results
Comment thread
Szelethus marked this conversation as resolved.

@classmethod
def contains_regex_in_files(self, regex: str, folder_path: str) -> list[str]:
"""
Returns a list of files it found your regex in
"""
result = []
for file in folder_path:
logging.debug(f"Checking file: {file}")
if self.grep_file(file, regex):
result.append(file)
return result
Comment thread
furtib marked this conversation as resolved.
Outdated