File tree Expand file tree Collapse file tree
src/extensions/score_source_code_linker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ extend-exclude = [
2323 " .venv*/**" ,
2424]
2525[tool .pytest .ini_options ]
26- addopts = [" -v" , " -s" ]
2726log_cli = true
2827log_cli_level = " Debug"
2928log_cli_format = " [%(asctime)s.%(msecs)03d] [%(levelname)-3s] [%(name)s] %(message)s"
Original file line number Diff line number Diff line change @@ -323,6 +323,7 @@ def test_get_github_link_with_real_repo(git_repo: Path) -> None:
323323 assert hash_from_link == actual_hash
324324
325325
326+
326327def test_complete_workflow (known_good_json : Path ):
327328 """Test complete workflow from path to GitHub link."""
328329
Original file line number Diff line number Diff line change 1010#
1111# SPDX-License-Identifier: Apache-2.0
1212# *******************************************************************************
13+
14+ # ╓ ╖
15+ # ║ Some portions generated by CoPilot ║
16+ # ╙ ╜
17+
1318import contextlib
1419import json
1520import os
@@ -322,11 +327,7 @@ def test_repo_grouping_multiple_needs_per_repo(
322327
323328 # All 3 MOD_REQ should be in this repo
324329 need_ids = {need .need for need in local_repo .needs }
325- assert (
326- "MOD_REQ_1" in need_ids
327- or "MOD_REQ_2" in need_ids
328- or "MOD_REQ_3" in need_ids
329- )
330+ assert {"MOD_REQ_1" , "MOD_REQ_2" , "MOD_REQ_3" }.issubset (need_ids )
330331
331332 finally :
332333 app .cleanup ()
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ def test_clean_test_file_name_combo_path():
359359def test_clean_test_file_name_tests_report_path ():
360360 raw_path = Path ("/some/path/tests-report/test-report/unit/test_module.xml" )
361361 result = xml_parser .clean_test_file_name (raw_path )
362- assert result == Path ("unit/test_module.xml" )
362+ assert result == Path ("test-report/ unit/test_module.xml" )
363363
364364
365365def test_clean_test_file_name_nested_bazel_testlogs ():
@@ -371,14 +371,14 @@ def test_clean_test_file_name_nested_bazel_testlogs():
371371def test_clean_test_file_name_invalid_path_raises_error ():
372372 raw_path = Path ("/invalid/path/without/markers/test.xml" )
373373 with pytest .raises (
374- ValueError , match = "Filepath does not have 'bazel-testlogs' nor 'test -report'"
374+ ValueError , match = "Filepath does not have 'bazel-testlogs' nor 'tests -report'"
375375 ):
376376 xml_parser .clean_test_file_name (raw_path )
377377
378378
379379def test_clean_test_file_name_empty_path_raises_error ():
380380 raw_path = Path ("" )
381381 with pytest .raises (
382- ValueError , match = "Filepath does not have 'bazel-testlogs' nor 'test -report'"
382+ ValueError , match = "Filepath does not have 'bazel-testlogs' nor 'tests -report'"
383383 ):
384384 xml_parser .clean_test_file_name (raw_path )
Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ def clean_test_file_name(raw_filepath: Path) -> Path:
7171 if "bazel-testlogs" in str (raw_filepath ):
7272 return Path (str (raw_filepath ).split ("bazel-testlogs/" )[- 1 ])
7373 if "tests-report" in str (raw_filepath ):
74- return Path (str (raw_filepath ).split ("test -report/" )[- 1 ])
74+ return Path (str (raw_filepath ).split ("tests -report/" )[- 1 ])
7575 raise ValueError (
7676 "Filepath does not have 'bazel-testlogs' nor "
77- f"'test -report'. Filepath: { raw_filepath } "
77+ + f"'tests -report'. Filepath: { raw_filepath } "
7878 )
7979
8080
You can’t perform that action at this time.
0 commit comments