Skip to content

test(verifier): replace sed calls with native Python code#157

Merged
tiborsimko merged 1 commit intocernopendata:masterfrom
tiborsimko:fix-test-sed-calls-on-macos
Oct 16, 2025
Merged

test(verifier): replace sed calls with native Python code#157
tiborsimko merged 1 commit intocernopendata:masterfrom
tiborsimko:fix-test-sed-calls-on-macos

Conversation

@tiborsimko
Copy link
Member

@tiborsimko tiborsimko commented Oct 5, 2025

On macOS, sed -i -e creates backup files with -e suffix, causing test failures due to unexpected files in the test directory. This commit replaces sed commands with native Python file operations for better platform independence of tests.

@tiborsimko tiborsimko self-assigned this Oct 5, 2025
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Oct 5, 2025
…code (cernopendata#157)

On macOS, `sed -i -e` creates backup files with `-e` suffix, causing
test failures due to unexpected files in the test directory. This commit
replaces `sed` commands with native Python file operations.
@tiborsimko tiborsimko force-pushed the fix-test-sed-calls-on-macos branch from 761b5a5 to 221b46e Compare October 5, 2025 14:13
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Oct 5, 2025
…data#157)

On macOS, `sed -i -e` creates backup files with `-e` suffix, causing
test failures due to unexpected files in the test directory. This commit
replaces `sed` commands with native Python file operations for better
platform independence of tests.
@tiborsimko tiborsimko force-pushed the fix-test-sed-calls-on-macos branch from 221b46e to 6b5be76 Compare October 5, 2025 14:18
@tiborsimko tiborsimko changed the title test(verifier): replace sed calls with platform-independent Python … test(verifier): replace sed calls with native Python code Oct 5, 2025
@codecov
Copy link

codecov bot commented Oct 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.75%. Comparing base (625eb9d) to head (20588e8).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   80.80%   80.75%   -0.06%     
==========================================
  Files          12       12              
  Lines         719      717       -2     
==========================================
- Hits          581      579       -2     
  Misses        138      138              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…data#157)

On macOS, `sed -i -e` creates backup files with `-e` suffix, causing
test failures due to unexpected files in the test directory. This commit
replaces `sed` commands with native Python file operations for better
platform independence of tests.
@tiborsimko tiborsimko force-pushed the fix-test-sed-calls-on-macos branch from 6b5be76 to 20588e8 Compare October 15, 2025 13:07
@michaelbuchar
Copy link

I get this failure when running tests:

=================================== FAILURES ===================================
_______________ test_get_file_locations_with_custom_https_server _______________

def test_get_file_locations_with_custom_https_server():
    """Test `get-file-locations --server` command for custom https server."""
    test_get_file_locations = CliRunner()
    test_result = test_get_file_locations.invoke(
        get_file_locations, ["--recid", 5500, "--server", "https://opendata-qa.cern.ch"]
    )
  assert test_result.exit_code == 0

E assert 1 == 0
E + where 1 = <Result SystemExit(1)>.exit_code

tests/test_cli_get_file_locations.py:141: AssertionError
=========================== short test summary info ============================
FAILED tests/test_cli_get_file_locations.py::test_get_file_locations_with_custom_https_server
======================== 1 failed, 82 passed in 40.27s =========================

@michaelbuchar
Copy link

michaelbuchar commented Oct 15, 2025

Moreover, are you planning on solving the failing CI checks? I believe the failure I got referenced in the above comment may be related to that.

@tiborsimko
Copy link
Member Author

I get this failure when running tests:

Yes, this is due to a temporary indexing trouble on the QA instance of the portal... It was working last week. Pablo is checking the QA instance. (And everything is OK also on the PROD and DEV instances.)

@tiborsimko tiborsimko merged commit 20588e8 into cernopendata:master Oct 16, 2025
36 of 43 checks passed
@tiborsimko tiborsimko deleted the fix-test-sed-calls-on-macos branch October 16, 2025 09:40
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