|
1 | 1 | import os
|
2 | 2 |
|
3 |
| -from .helpers import TEST_DATA_PATH, find_test_line_no |
| 3 | +from .helpers import TEST_DATA_PATH, find_test_line_number |
4 | 4 |
|
5 | 5 | # This is the expected output for the empty_discovery.py file.
|
6 | 6 | # └──
|
|
31 | 31 | {
|
32 | 32 | "name": "test_function",
|
33 | 33 | "path": simple_test_file_path,
|
34 |
| - "lineno": find_test_line_no( |
| 34 | + "lineno": find_test_line_number( |
35 | 35 | "test_function",
|
36 | 36 | simple_test_file_path,
|
37 | 37 | ),
|
|
50 | 50 | # ├── TestExample
|
51 | 51 | # │ └── test_true_unittest
|
52 | 52 | # └── test_true_pytest
|
53 |
| - |
54 | 53 | unit_pytest_same_file_path = f"{TEST_DATA_PATH_STR}/unittest_pytest_same_file.py"
|
55 | 54 | unit_pytest_same_file_discovery_expected_output = {
|
56 | 55 | "name": ".data",
|
|
71 | 70 | {
|
72 | 71 | "name": "test_true_unittest",
|
73 | 72 | "path": unit_pytest_same_file_path,
|
74 |
| - "lineno": find_test_line_no( |
| 73 | + "lineno": find_test_line_number( |
75 | 74 | "test_true_unittest",
|
76 | 75 | unit_pytest_same_file_path,
|
77 | 76 | ),
|
|
85 | 84 | {
|
86 | 85 | "name": "test_true_pytest",
|
87 | 86 | "path": unit_pytest_same_file_path,
|
88 |
| - "lineno": find_test_line_no( |
| 87 | + "lineno": find_test_line_number( |
89 | 88 | "test_true_pytest",
|
90 | 89 | unit_pytest_same_file_path,
|
91 | 90 | ),
|
|
109 | 108 | # └── TestSubtractFunction
|
110 | 109 | # ├── test_subtract_negative_numbers
|
111 | 110 | # └── test_subtract_positive_numbers
|
112 |
| - |
113 | 111 | unittest_folder_path = f"{TEST_DATA_PATH_STR}/unittest_folder"
|
114 | 112 | test_add_path = f"{TEST_DATA_PATH_STR}/unittest_folder/test_add.py"
|
115 | 113 | test_subtract_path = f"{TEST_DATA_PATH_STR}/unittest_folder/test_subtract.py"
|
|
138 | 136 | {
|
139 | 137 | "name": "test_add_negative_numbers",
|
140 | 138 | "path": test_add_path,
|
141 |
| - "lineno": find_test_line_no( |
| 139 | + "lineno": find_test_line_number( |
142 | 140 | "test_add_negative_numbers",
|
143 | 141 | test_add_path,
|
144 | 142 | ),
|
|
149 | 147 | {
|
150 | 148 | "name": "test_add_positive_numbers",
|
151 | 149 | "path": test_add_path,
|
152 |
| - "lineno": find_test_line_no( |
| 150 | + "lineno": find_test_line_number( |
153 | 151 | "test_add_positive_numbers",
|
154 | 152 | test_add_path,
|
155 | 153 | ),
|
|
176 | 174 | {
|
177 | 175 | "name": "test_subtract_negative_numbers",
|
178 | 176 | "path": test_subtract_path,
|
179 |
| - "lineno": find_test_line_no( |
| 177 | + "lineno": find_test_line_number( |
180 | 178 | "test_subtract_negative_numbers",
|
181 | 179 | test_subtract_path,
|
182 | 180 | ),
|
|
187 | 185 | {
|
188 | 186 | "name": "test_subtract_positive_numbers",
|
189 | 187 | "path": test_subtract_path,
|
190 |
| - "lineno": find_test_line_no( |
| 188 | + "lineno": find_test_line_number( |
191 | 189 | "test_subtract_positive_numbers",
|
192 | 190 | test_subtract_path,
|
193 | 191 | ),
|
|
244 | 242 | {
|
245 | 243 | "name": "test_top_function_t",
|
246 | 244 | "path": test_top_folder_path,
|
247 |
| - "lineno": find_test_line_no( |
| 245 | + "lineno": find_test_line_number( |
248 | 246 | "test_top_function_t",
|
249 | 247 | test_top_folder_path,
|
250 | 248 | ),
|
|
255 | 253 | {
|
256 | 254 | "name": "test_top_function_f",
|
257 | 255 | "path": test_top_folder_path,
|
258 |
| - "lineno": find_test_line_no( |
| 256 | + "lineno": find_test_line_number( |
259 | 257 | "test_top_function_f",
|
260 | 258 | test_top_folder_path,
|
261 | 259 | ),
|
|
280 | 278 | {
|
281 | 279 | "name": "test_bottom_function_t",
|
282 | 280 | "path": test_bottom_folder_path,
|
283 |
| - "lineno": find_test_line_no( |
| 281 | + "lineno": find_test_line_number( |
284 | 282 | "test_bottom_function_t",
|
285 | 283 | test_bottom_folder_path,
|
286 | 284 | ),
|
|
291 | 289 | {
|
292 | 290 | "name": "test_bottom_function_f",
|
293 | 291 | "path": test_bottom_folder_path,
|
294 |
| - "lineno": find_test_line_no( |
| 292 | + "lineno": find_test_line_number( |
295 | 293 | "test_bottom_function_f",
|
296 | 294 | test_bottom_folder_path,
|
297 | 295 | ),
|
|
355 | 353 | {
|
356 | 354 | "name": "test_function",
|
357 | 355 | "path": double_nested_test_nest_path,
|
358 |
| - "lineno": find_test_line_no( |
| 356 | + "lineno": find_test_line_number( |
359 | 357 | "test_function",
|
360 | 358 | double_nested_test_nest_path,
|
361 | 359 | ),
|
|
395 | 393 | {
|
396 | 394 | "name": "test_adding[3+5-8]",
|
397 | 395 | "path": parameterize_tests_path,
|
398 |
| - "lineno": find_test_line_no( |
| 396 | + "lineno": find_test_line_number( |
399 | 397 | "test_adding[3+5-8]",
|
400 | 398 | parameterize_tests_path,
|
401 | 399 | ),
|
|
406 | 404 | {
|
407 | 405 | "name": "test_adding[2+4-6]",
|
408 | 406 | "path": parameterize_tests_path,
|
409 |
| - "lineno": find_test_line_no( |
| 407 | + "lineno": find_test_line_number( |
410 | 408 | "test_adding[2+4-6]",
|
411 | 409 | parameterize_tests_path,
|
412 | 410 | ),
|
|
417 | 415 | {
|
418 | 416 | "name": "test_adding[6+9-16]",
|
419 | 417 | "path": parameterize_tests_path,
|
420 |
| - "lineno": find_test_line_no( |
| 418 | + "lineno": find_test_line_number( |
421 | 419 | "test_adding[6+9-16]",
|
422 | 420 | parameterize_tests_path,
|
423 | 421 | ),
|
|
448 | 446 | {
|
449 | 447 | "name": "text_docstring.txt",
|
450 | 448 | "path": text_docstring_path,
|
451 |
| - "lineno": find_test_line_no( |
| 449 | + "lineno": find_test_line_number( |
452 | 450 | "text_docstring.txt",
|
453 | 451 | text_docstring_path,
|
454 | 452 | ),
|
|
0 commit comments