🧪 Tests for name2uniprot in pathwaycommons - #53
Conversation
Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
akutuva21
commented
Apr 13, 2026
Superseded by #60 pathwaycommons HTTPError test coverage. |
🎯 What: The testing gap addressed
The
name2uniprotfunction inbionetgen/atomizer/utils/pathwaycommons.pylacked test coverage and requires mocked HTTP calls to biogrid/uniprot to be tested safely. The correct signature isdef name2uniprot(nameStr, organism)based on the active code in the repository.📊 Coverage: What scenarios are now tested
Created tests mapping to five distinct scenarios using
unittest.mock.patchforurllib.request.urlopen:✨ Result: The improvement in test coverage
Test coverage is significantly improved by isolating external network requests, leading to deterministic test execution for the
name2uniprotfunction. We use byte-strings internally mapped with.decode('utf-8')for correctness since the responses come fromurllib.request.urlopen().read().PR created automatically by Jules for task 14141266211072448977 started by @akutuva21