File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,12 @@ def build_markdown_content(
150
150
:param stargazers: The list of stargazers of the repository.
151
151
:return: The markdown content to be inserted into the README.
152
152
"""
153
- md_content = "User | Contribution\n ---|---\n "
154
153
154
+ if not contributors :
155
+ logger .info (f"No contributors found yet, cancelling markdown generation" )
156
+ return ""
157
+
158
+ md_content = "User | Contribution\n ---|---\n "
155
159
for contributor in contributors :
156
160
username = contributor ["username" ]
157
161
question = contributor ["question" ]
Original file line number Diff line number Diff line change 1
1
import unittest
2
+ import os
3
+
4
+ # Get the directory where the script is located
5
+ current_directory = os .path .dirname (os .path .abspath (__file__ ))
2
6
3
- # Discover and run all tests in the current directory and its subdirectories.
4
7
if __name__ == "__main__" :
5
8
test_loader = unittest .TestLoader ()
6
- test_suite = test_loader .discover (start_dir = '.' , pattern = 'test_*.py' )
9
+ # Set the start directory to the directory of this script
10
+ test_suite = test_loader .discover (start_dir = current_directory , pattern = 'test_*.py' )
7
11
test_runner = unittest .TextTestRunner (verbosity = 2 )
8
12
test_runner .run (test_suite )
You can’t perform that action at this time.
0 commit comments