Coverage report: + 93% +
+ + ++ Files + Functions + Classes +
++ coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
+From cba2f846e717404a3662af7552558dd47472ffd3 Mon Sep 17 00:00:00 2001 From: dev-shiki <71618208+dev-shiki@users.noreply.github.com> Date: Wed, 14 May 2025 09:51:37 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Add=20AI-generated=20tests=20for=20?= =?UTF-8?q?modules=20with=20low=20coverage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- COVERAGE_SUMMARY.md | 10 + coverage-reports/coverage-analysis.json | 16 + .../coverage-final/class_index.html | 164 +++ coverage-reports/coverage-final/coverage.json | 1 + .../coverage_html_cb_6fb7b396.js | 733 ++++++++++++++ .../coverage-final/favicon_32_cb_58284776.png | Bin 0 -> 1730 bytes .../coverage-final/function_index.html | 194 ++++ coverage-reports/coverage-final/index.html | 129 +++ .../keybd_closed_cb_ce680311.png | Bin 0 -> 9003 bytes coverage-reports/coverage-final/status.json | 1 + .../coverage-final/style_cb_8e611ae1.css | 337 +++++++ .../z_a44f0ac069e85531___init___py.html | 108 ++ ...44f0ac069e85531_test_radio_browser_py.html | 951 ++++++++++++++++++ .../z_c8b1f7e3f131828c_models_py.html | 259 +++++ .../z_c8b1f7e3f131828c_radio_browser_py.html | 546 ++++++++++ coverage-reports/coverage-initial.json | 1 + .../coverage-post-generation.json | 1 + test-results/COVERAGE_SUMMARY.md | 10 + test-results/api_interaction_logs.json | 2 + test-results/coverage-analysis.json | 16 + test-results/coverage-final/class_index.html | 164 +++ test-results/coverage-final/coverage.json | 1 + .../coverage_html_cb_6fb7b396.js | 733 ++++++++++++++ .../coverage-final/favicon_32_cb_58284776.png | Bin 0 -> 1730 bytes .../coverage-final/function_index.html | 194 ++++ test-results/coverage-final/index.html | 129 +++ .../keybd_closed_cb_ce680311.png | Bin 0 -> 9003 bytes test-results/coverage-final/status.json | 1 + .../coverage-final/style_cb_8e611ae1.css | 337 +++++++ .../z_a44f0ac069e85531___init___py.html | 108 ++ ...44f0ac069e85531_test_radio_browser_py.html | 951 ++++++++++++++++++ .../z_c8b1f7e3f131828c_models_py.html | 259 +++++ .../z_c8b1f7e3f131828c_radio_browser_py.html | 546 ++++++++++ test-results/coverage-initial.json | 1 + test-results/coverage-post-generation.json | 1 + ...periment_data_complete_20250514_095124.zip | Bin 0 -> 151397 bytes test-results/generation_metrics.txt | 5 + test-results/tests/test_radio_browser.py | 852 ++++++++++++++++ test-results/tests/test_radios.py | 26 + tests/test_radio_browser.py | 852 ++++++++++++++++ 40 files changed, 8639 insertions(+) create mode 100644 COVERAGE_SUMMARY.md create mode 100644 coverage-reports/coverage-analysis.json create mode 100644 coverage-reports/coverage-final/class_index.html create mode 100644 coverage-reports/coverage-final/coverage.json create mode 100644 coverage-reports/coverage-final/coverage_html_cb_6fb7b396.js create mode 100644 coverage-reports/coverage-final/favicon_32_cb_58284776.png create mode 100644 coverage-reports/coverage-final/function_index.html create mode 100644 coverage-reports/coverage-final/index.html create mode 100644 coverage-reports/coverage-final/keybd_closed_cb_ce680311.png create mode 100644 coverage-reports/coverage-final/status.json create mode 100644 coverage-reports/coverage-final/style_cb_8e611ae1.css create mode 100644 coverage-reports/coverage-final/z_a44f0ac069e85531___init___py.html create mode 100644 coverage-reports/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html create mode 100644 coverage-reports/coverage-final/z_c8b1f7e3f131828c_models_py.html create mode 100644 coverage-reports/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html create mode 100644 coverage-reports/coverage-initial.json create mode 100644 coverage-reports/coverage-post-generation.json create mode 100644 test-results/COVERAGE_SUMMARY.md create mode 100644 test-results/api_interaction_logs.json create mode 100644 test-results/coverage-analysis.json create mode 100644 test-results/coverage-final/class_index.html create mode 100644 test-results/coverage-final/coverage.json create mode 100644 test-results/coverage-final/coverage_html_cb_6fb7b396.js create mode 100644 test-results/coverage-final/favicon_32_cb_58284776.png create mode 100644 test-results/coverage-final/function_index.html create mode 100644 test-results/coverage-final/index.html create mode 100644 test-results/coverage-final/keybd_closed_cb_ce680311.png create mode 100644 test-results/coverage-final/status.json create mode 100644 test-results/coverage-final/style_cb_8e611ae1.css create mode 100644 test-results/coverage-final/z_a44f0ac069e85531___init___py.html create mode 100644 test-results/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html create mode 100644 test-results/coverage-final/z_c8b1f7e3f131828c_models_py.html create mode 100644 test-results/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html create mode 100644 test-results/coverage-initial.json create mode 100644 test-results/coverage-post-generation.json create mode 100644 test-results/experiment_data_complete_20250514_095124.zip create mode 100644 test-results/generation_metrics.txt create mode 100644 test-results/tests/test_radio_browser.py create mode 100644 test-results/tests/test_radios.py create mode 100644 tests/test_radio_browser.py diff --git a/COVERAGE_SUMMARY.md b/COVERAGE_SUMMARY.md new file mode 100644 index 00000000..6436f9f5 --- /dev/null +++ b/COVERAGE_SUMMARY.md @@ -0,0 +1,10 @@ +# Coverage Summary + +**Initial Coverage**: 61.5% +**Final Coverage**: 95.9% +**Improvement**: 34.4% + +## Coverage Improvements by File + +- `src/radios/models.py`: 85.2% → 86.4% +- `src/radios/radio_browser.py`: 35.2% → 97.2% diff --git a/coverage-reports/coverage-analysis.json b/coverage-reports/coverage-analysis.json new file mode 100644 index 00000000..1b36ea8e --- /dev/null +++ b/coverage-reports/coverage-analysis.json @@ -0,0 +1,16 @@ +{ + "improvements": [ + { + "file": "src/radios/models.py", + "from": 85.22727272727273, + "to": 86.36363636363636 + }, + { + "file": "src/radios/radio_browser.py", + "from": 35.172413793103445, + "to": 97.24137931034483 + } + ], + "still_low": [], + "failed_tests": [] +} \ No newline at end of file diff --git a/coverage-reports/coverage-final/class_index.html b/coverage-reports/coverage-final/class_index.html new file mode 100644 index 00000000..9f758809 --- /dev/null +++ b/coverage-reports/coverage-final/class_index.html @@ -0,0 +1,164 @@ + + +
+ ++ coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
+| File | +class | +statements | +missing | +excluded | +branches | +partial | +coverage | +
|---|---|---|---|---|---|---|---|
| src/radios/models.py | +CommaSeparatedString | +2 | +1 | +0 | +0 | +0 | +50% | +
| src/radios/models.py | +Station | +3 | +3 | +0 | +2 | +0 | +0% | +
| src/radios/models.py | +Country | +1 | +1 | +0 | +0 | +0 | +0% | +
| src/radios/models.py | +Language | +3 | +3 | +0 | +2 | +0 | +0% | +
| src/radios/radio_browser.py | +RadioBrowser | +75 | +0 | +0 | +34 | +4 | +96% | +
| Total | ++ | 195 | +8 | +0 | +38 | +4 | +93% | +
+ No items found using the specified filter. +
+4 classes skipped due to complete coverage.
+3w)2IT*k10eZsd$(=pnmsHnEG#TL@Ea0V(Usa#jIy)UV<&N4mSI&9U7 ?c z=Vcl*bD8D6w-(lE%U0Z3zWR5=%1O39Vho}-rl!7oc5MK;B>0iXypN5R7S`_WX)P_* ztwCnN5&!`eI48}S)eH9OS&u6h?te~)IMUK`b+W_rH4H4C>#M6vz+t(y+4}PNkc@8& zEI}%))BhySs1;){aCV*yj%yp=n;sSyLqjrdy;))n)W2ZWnZnyCtRQcKK}Y}6h1T=u zhSo1~O}zef<)_xR6Y<9nP2`6LR7cLHgNrRa=7om5nrdtA?GO;;?`Joy) vjng!Grr%H1%FtPb|PIs^~b16Rk@)FPm)BFPc<73Uu z&GP~aXQZ&HGcYi+OpiA=Gcz-HIs7c->LOQLyFCA(fQgQY0YUMSjG+7gm|&`{83>p= zUaNm{1jI0NaSb?G<6sxa&ICzv`Q{K6Q!`!{LYZccJ}!RDs*ps oR zx3hBy_IEV*o)jp_4zVARw;9=VgB{|$?OaN0f;Cv#5SbUDgo}fpRlKQ5Tv~~POC2r@ Y059?-JLr>-3IG5A07*qoM6N<$g7d!_7ytkO literal 0 HcmV?d00001 diff --git a/coverage-reports/coverage-final/function_index.html b/coverage-reports/coverage-final/function_index.html new file mode 100644 index 00000000..5c5b2e1e --- /dev/null +++ b/coverage-reports/coverage-final/function_index.html @@ -0,0 +1,194 @@ + + + + + Coverage report + + + + + ++ +++Coverage report: + 93% +
+ + ++ Files + Functions + Classes +
++ coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
++ + + + diff --git a/coverage-reports/coverage-final/index.html b/coverage-reports/coverage-final/index.html new file mode 100644 index 00000000..f35324cd --- /dev/null +++ b/coverage-reports/coverage-final/index.html @@ -0,0 +1,129 @@ + + + + ++ +
++ + + +File +function +statements +missing +excluded +branches +partial +coverage ++ +src/radios/models.py +CommaSeparatedString.serialize +1 +1 +0 +0 +0 +0% ++ +src/radios/models.py +Station.country +3 +3 +0 +2 +0 +0% ++ +src/radios/models.py +Country.favicon +1 +1 +0 +0 +0 +0% ++ +src/radios/models.py +Language.favicon +3 +3 +0 +2 +0 +0% ++ +src/radios/radio_browser.py +RadioBrowser._request +29 +0 +0 +12 +1 +98% ++ +src/radios/radio_browser.py +RadioBrowser.countries +11 +0 +0 +8 +1 +95% ++ +src/radios/radio_browser.py +RadioBrowser.search +8 +0 +0 +4 +1 +92% ++ + + +src/radios/radio_browser.py +RadioBrowser.stations +8 +0 +0 +4 +1 +92% ++ + +Total ++ 195 +8 +0 +38 +4 +93% ++ No items found using the specified filter. +
+11 functions skipped due to complete coverage.
+Coverage report + + + + + ++ +++Coverage report: + 94% +
+ + ++ Files + Functions + Classes +
++ coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
++ + + + diff --git a/coverage-reports/coverage-final/keybd_closed_cb_ce680311.png b/coverage-reports/coverage-final/keybd_closed_cb_ce680311.png new file mode 100644 index 0000000000000000000000000000000000000000..9c5dc188f8fe076cf0ee3573f4d8d3fb6ea04f85 GIT binary patch literal 9003 zcmeHLc{tSF+aIY=A^R4_poB4tZAN2XC;O7M(inrW3}(h&Q4}dl*&-65$i9^&vW6_# zcM4g`Qix=GhkBl;=lwnJ@Ap2}^}hc-b6vBXb3XUyzR%~}_c`-Dw+!?&k8mFW008u8 zEj1&`Hyh=BjP@Yq^VDkvJph2|hOdb^*$CqWbR)Xj;hk|nvX2`Mi1WtV0RY}Z3kepU zJZB2kcVVI2DycL#13hyRYIv?L&+ +
++ + + +File +statements +missing +excluded +branches +partial +coverage ++ +src/radios/models.py +84 +8 +0 +4 +0 +86% ++ + + +src/radios/radio_browser.py +111 +0 +0 +34 +4 +97% ++ + +Total +240 +8 +0 +38 +4 +94% ++ No items found using the specified filter. +
+3 files skipped due to complete coverage.
+5<7eM(VPa=?2gSYU$cX`ADyspqDfb_7-MY!qwI))-&5xyDw6jy1eN= z49@HO+gHj8u6WPHKHr(>_3=9PdD$t<^)hXx< 9KpxBwXoQ8-S-=q$Uw$t>}T?^~f z%_i4us=0+mm6e^cdfBJ$#Smz55cGXYG9|N$NsLNn`Bbn9L&+>Q1eS3hdrP`>%2*4Q z9vu~6{YD}91gQlXcb+6x6~wG9TE=SZi0?heh-gf3%uVkb;*OHhAdHN@cvP}jzLfI% zq3>dP|JdO<$=VRXFjOd)NAX-n^1FH+$qx7@=Qk2Y_#13ymOe4(%!bp3*3Qho=x(o= zFCVt*$wp$fS65~Xiz1#P!=lgMA5U$}K`P$NKXA&>Mx*|Gz8XsVpq9faSVbs(4HsQf z{hjQ`qN#N)A~o@*AdQ1{g%X5K_6qB}exVQO-fOy(BAU49Myr{Sf+>DXWgYIDAV=f! zwilJ1v}mqSV~GBSdyQz@SDy`>6Q9v5prv?JMb_m~g(c}J<7#4 _FSAR&j_M*M>evV``OChVyt>jkc+-nc?$`@hx(| z>+R_$)Tl*SMc#Mr)f;nwh|M;Ans2+P?`?qXp>!qtR0b0e$C=?3vd?;C|A^S@>FI%z zJSCsFPCqMBTFjayU15ReiDHAd -P9 zV`WaHhVi(?R$r1hY1c>>p{RTg8m%rsn=$#45z%G0c>m?N>75x9`@1e3BKGs5aZA1V zT`@+1ahnZ2xs16nJR0$_0$%5-J|(z}K<@AvFArRWwPkR5OT;MaF4#a96il0{Mlr2e z;-Uv*9wE1H?NPFl6Jf QvlYHFvuX@y`Dsx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+%@y578U=mP>i_4!ZNMv=-Km7fr1<8bRkq9xu zkz759Se&{ijzAXt)v24a2kBRz9wgje*M8j2wssIoQ2U;Lwb4ZD8vJgvC!;;y#ckhW z5B)3B7W+HS&4cK?kFmu IYq0 =pQ`>&KR I4<^^N}+F~PgwjLDci)nGC(grp2o3Wk)H zl$1pLVs45fk| Vz~TGmwpck03MGb;ZFm=qJr3eVu-_lpTNgRXY$(c7E(G?> zVEg@)$;hb^aTu~I(Zto&Sst_(EO3u g-CqKVjz5O54j6(x zj ?Bt^ zvKNMkQ?{q%0A-yiwY9&_K#?Emclyu4csbzqa*IL-hDw29k|uCTIjE$ZB&FJ< lGEY@$y^FQEzvHzK<|H=GU z*bi$}S2rI@B|DJyy$Ju-{a*loFzDd1I0DJ_--Z4w TQXa?;*l2620d|8UTB|87IyWr~5&&?NW$#S|NJ!+QbkdN~y6Q9^ z4l+ body { font-size: 16px; } + +a:active, a:focus { outline: 2px dashed #007acc; } + +p { font-size: .875em; line-height: 1.4em; } + +table { border-collapse: collapse; } + +td { vertical-align: top; } + +table tr.hidden { display: none !important; } + +p#no_rows { display: none; font-size: 1.15em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } + +a.nav { text-decoration: none; color: inherit; } + +a.nav:hover { text-decoration: underline; color: inherit; } + +.hidden { display: none; } + +header { background: #f8f8f8; width: 100%; z-index: 2; border-bottom: 1px solid #ccc; } + +@media (prefers-color-scheme: dark) { header { background: black; } } + +@media (prefers-color-scheme: dark) { header { border-color: #333; } } + +header .content { padding: 1rem 3.5rem; } + +header h2 { margin-top: .5em; font-size: 1em; } + +header h2 a.button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; background: #eee; color: inherit; text-decoration: none; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; } + +@media (prefers-color-scheme: dark) { header h2 a.button { background: #333; } } + +@media (prefers-color-scheme: dark) { header h2 a.button { border-color: #444; } } + +header h2 a.button.current { border: 2px solid; background: #fff; border-color: #999; cursor: default; } + +@media (prefers-color-scheme: dark) { header h2 a.button.current { background: #1e1e1e; } } + +@media (prefers-color-scheme: dark) { header h2 a.button.current { border-color: #777; } } + +header p.text { margin: .5em 0 -.5em; color: #666; font-style: italic; } + +@media (prefers-color-scheme: dark) { header p.text { color: #aaa; } } + +header.sticky { position: fixed; left: 0; right: 0; height: 2.5em; } + +header.sticky .text { display: none; } + +header.sticky h1, header.sticky h2 { font-size: 1em; margin-top: 0; display: inline-block; } + +header.sticky .content { padding: 0.5rem 3.5rem; } + +header.sticky .content p { font-size: 1em; } + +header.sticky ~ #source { padding-top: 6.5em; } + +main { position: relative; z-index: 1; } + +footer { margin: 1rem 3.5rem; } + +footer .content { padding: 0; color: #666; font-style: italic; } + +@media (prefers-color-scheme: dark) { footer .content { color: #aaa; } } + +#index { margin: 1rem 0 0 3.5rem; } + +h1 { font-size: 1.25em; display: inline-block; } + +#filter_container { float: right; margin: 0 2em 0 0; line-height: 1.66em; } + +#filter_container #filter { width: 10em; padding: 0.2em 0.5em; border: 2px solid #ccc; background: #fff; color: #000; } + +@media (prefers-color-scheme: dark) { #filter_container #filter { border-color: #444; } } + +@media (prefers-color-scheme: dark) { #filter_container #filter { background: #1e1e1e; } } + +@media (prefers-color-scheme: dark) { #filter_container #filter { color: #eee; } } + +#filter_container #filter:focus { border-color: #007acc; } + +#filter_container :disabled ~ label { color: #ccc; } + +@media (prefers-color-scheme: dark) { #filter_container :disabled ~ label { color: #444; } } + +#filter_container label { font-size: .875em; color: #666; } + +@media (prefers-color-scheme: dark) { #filter_container label { color: #aaa; } } + +header button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; background: #eee; color: inherit; text-decoration: none; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; } + +@media (prefers-color-scheme: dark) { header button { background: #333; } } + +@media (prefers-color-scheme: dark) { header button { border-color: #444; } } + +header button:active, header button:focus { outline: 2px dashed #007acc; } + +header button.run { background: #eeffee; } + +@media (prefers-color-scheme: dark) { header button.run { background: #373d29; } } + +header button.run.show_run { background: #dfd; border: 2px solid #00dd00; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.run.show_run { background: #373d29; } } + +header button.mis { background: #ffeeee; } + +@media (prefers-color-scheme: dark) { header button.mis { background: #4b1818; } } + +header button.mis.show_mis { background: #fdd; border: 2px solid #ff0000; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.mis.show_mis { background: #4b1818; } } + +header button.exc { background: #f7f7f7; } + +@media (prefers-color-scheme: dark) { header button.exc { background: #333; } } + +header button.exc.show_exc { background: #eee; border: 2px solid #808080; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.exc.show_exc { background: #333; } } + +header button.par { background: #ffffd5; } + +@media (prefers-color-scheme: dark) { header button.par { background: #650; } } + +header button.par.show_par { background: #ffa; border: 2px solid #bbbb00; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.par.show_par { background: #650; } } + +#help_panel, #source p .annotate.long { display: none; position: absolute; z-index: 999; background: #ffffcc; border: 1px solid #888; border-radius: .2em; color: #333; padding: .25em .5em; } + +#source p .annotate.long { white-space: normal; float: right; top: 1.75em; right: 1em; height: auto; } + +#help_panel_wrapper { float: right; position: relative; } + +#keyboard_icon { margin: 5px; } + +#help_panel_state { display: none; } + +#help_panel { top: 25px; right: 0; padding: .75em; border: 1px solid #883; color: #333; } + +#help_panel .keyhelp p { margin-top: .75em; } + +#help_panel .legend { font-style: italic; margin-bottom: 1em; } + +.indexfile #help_panel { width: 25em; } + +.pyfile #help_panel { width: 18em; } + +#help_panel_state:checked ~ #help_panel { display: block; } + +kbd { border: 1px solid black; border-color: #888 #333 #333 #888; padding: .1em .35em; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: bold; background: #eee; border-radius: 3px; } + +#source { padding: 1em 0 1em 3.5rem; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; } + +#source p { position: relative; white-space: pre; } + +#source p * { box-sizing: border-box; } + +#source p .n { float: left; text-align: right; width: 3.5rem; box-sizing: border-box; margin-left: -3.5rem; padding-right: 1em; color: #999; user-select: none; } + +@media (prefers-color-scheme: dark) { #source p .n { color: #777; } } + +#source p .n.highlight { background: #ffdd00; } + +#source p .n a { scroll-margin-top: 6em; text-decoration: none; color: #999; } + +@media (prefers-color-scheme: dark) { #source p .n a { color: #777; } } + +#source p .n a:hover { text-decoration: underline; color: #999; } + +@media (prefers-color-scheme: dark) { #source p .n a:hover { color: #777; } } + +#source p .t { display: inline-block; width: 100%; box-sizing: border-box; margin-left: -.5em; padding-left: 0.3em; border-left: 0.2em solid #fff; } + +@media (prefers-color-scheme: dark) { #source p .t { border-color: #1e1e1e; } } + +#source p .t:hover { background: #f2f2f2; } + +@media (prefers-color-scheme: dark) { #source p .t:hover { background: #282828; } } + +#source p .t:hover ~ .r .annotate.long { display: block; } + +#source p .t .com { color: #008000; font-style: italic; line-height: 1px; } + +@media (prefers-color-scheme: dark) { #source p .t .com { color: #6a9955; } } + +#source p .t .key { font-weight: bold; line-height: 1px; } + +#source p .t .str { color: #0451a5; } + +@media (prefers-color-scheme: dark) { #source p .t .str { color: #9cdcfe; } } + +#source p.mis .t { border-left: 0.2em solid #ff0000; } + +#source p.mis.show_mis .t { background: #fdd; } + +@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t { background: #4b1818; } } + +#source p.mis.show_mis .t:hover { background: #f2d2d2; } + +@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t:hover { background: #532323; } } + +#source p.run .t { border-left: 0.2em solid #00dd00; } + +#source p.run.show_run .t { background: #dfd; } + +@media (prefers-color-scheme: dark) { #source p.run.show_run .t { background: #373d29; } } + +#source p.run.show_run .t:hover { background: #d2f2d2; } + +@media (prefers-color-scheme: dark) { #source p.run.show_run .t:hover { background: #404633; } } + +#source p.exc .t { border-left: 0.2em solid #808080; } + +#source p.exc.show_exc .t { background: #eee; } + +@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t { background: #333; } } + +#source p.exc.show_exc .t:hover { background: #e2e2e2; } + +@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t:hover { background: #3c3c3c; } } + +#source p.par .t { border-left: 0.2em solid #bbbb00; } + +#source p.par.show_par .t { background: #ffa; } + +@media (prefers-color-scheme: dark) { #source p.par.show_par .t { background: #650; } } + +#source p.par.show_par .t:hover { background: #f2f2a2; } + +@media (prefers-color-scheme: dark) { #source p.par.show_par .t:hover { background: #6d5d0c; } } + +#source p .r { position: absolute; top: 0; right: 2.5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } + +#source p .annotate { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; color: #666; padding-right: .5em; } + +@media (prefers-color-scheme: dark) { #source p .annotate { color: #ddd; } } + +#source p .annotate.short:hover ~ .long { display: block; } + +#source p .annotate.long { width: 30em; right: 2.5em; } + +#source p input { display: none; } + +#source p input ~ .r label.ctx { cursor: pointer; border-radius: .25em; } + +#source p input ~ .r label.ctx::before { content: "▶ "; } + +#source p input ~ .r label.ctx:hover { background: #e8f4ff; color: #666; } + +@media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { background: #0f3a42; } } + +@media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { color: #aaa; } } + +#source p input:checked ~ .r label.ctx { background: #d0e8ff; color: #666; border-radius: .75em .75em 0 0; padding: 0 .5em; margin: -.25em 0; } + +@media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { background: #056; } } + +@media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { color: #aaa; } } + +#source p input:checked ~ .r label.ctx::before { content: "▼ "; } + +#source p input:checked ~ .ctxs { padding: .25em .5em; overflow-y: scroll; max-height: 10.5em; } + +#source p label.ctx { color: #999; display: inline-block; padding: 0 .5em; font-size: .8333em; } + +@media (prefers-color-scheme: dark) { #source p label.ctx { color: #777; } } + +#source p .ctxs { display: block; max-height: 0; overflow-y: hidden; transition: all .2s; padding: 0 .5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; white-space: nowrap; background: #d0e8ff; border-radius: .25em; margin-right: 1.75em; text-align: right; } + +@media (prefers-color-scheme: dark) { #source p .ctxs { background: #056; } } + +#index { font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875em; } + +#index table.index { margin-left: -.5em; } + +#index td, #index th { text-align: right; padding: .25em .5em; border-bottom: 1px solid #eee; } + +@media (prefers-color-scheme: dark) { #index td, #index th { border-color: #333; } } + +#index td.name, #index th.name { text-align: left; width: auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; min-width: 15em; } + +#index th { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-style: italic; color: #333; cursor: pointer; } + +@media (prefers-color-scheme: dark) { #index th { color: #ddd; } } + +#index th:hover { background: #eee; } + +@media (prefers-color-scheme: dark) { #index th:hover { background: #333; } } + +#index th .arrows { color: #666; font-size: 85%; font-family: sans-serif; font-style: normal; pointer-events: none; } + +#index th[aria-sort="ascending"], #index th[aria-sort="descending"] { white-space: nowrap; background: #eee; padding-left: .5em; } + +@media (prefers-color-scheme: dark) { #index th[aria-sort="ascending"], #index th[aria-sort="descending"] { background: #333; } } + +#index th[aria-sort="ascending"] .arrows::after { content: " ▲"; } + +#index th[aria-sort="descending"] .arrows::after { content: " ▼"; } + +#index td.name { font-size: 1.15em; } + +#index td.name a { text-decoration: none; color: inherit; } + +#index td.name .no-noun { font-style: italic; } + +#index tr.total td, #index tr.total_dynamic td { font-weight: bold; border-top: 1px solid #ccc; border-bottom: none; } + +#index tr.region:hover { background: #eee; } + +@media (prefers-color-scheme: dark) { #index tr.region:hover { background: #333; } } + +#index tr.region:hover td.name { text-decoration: underline; color: inherit; } + +#scroll_marker { position: fixed; z-index: 3; right: 0; top: 0; width: 16px; height: 100%; background: #fff; border-left: 1px solid #eee; will-change: transform; } + +@media (prefers-color-scheme: dark) { #scroll_marker { background: #1e1e1e; } } + +@media (prefers-color-scheme: dark) { #scroll_marker { border-color: #333; } } + +#scroll_marker .marker { background: #ccc; position: absolute; min-height: 3px; width: 100%; } + +@media (prefers-color-scheme: dark) { #scroll_marker .marker { background: #444; } } diff --git a/coverage-reports/coverage-final/z_a44f0ac069e85531___init___py.html b/coverage-reports/coverage-final/z_a44f0ac069e85531___init___py.html new file mode 100644 index 00000000..df11f198 --- /dev/null +++ b/coverage-reports/coverage-final/z_a44f0ac069e85531___init___py.html @@ -0,0 +1,108 @@ + + + + + Coverage for tests/__init__.py: 50% + + + + + ++ ++++ Coverage for tests/__init__.py: + 50% +
+ ++ 4 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:50 +0000 +
+ ++ + + + diff --git a/coverage-reports/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html b/coverage-reports/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html new file mode 100644 index 00000000..b486d8ac --- /dev/null +++ b/coverage-reports/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html @@ -0,0 +1,951 @@ + + + + +1"""Asynchronous Python client for the Radio Browser API."""
+ +3from pathlib import Path
+ + +6def load_fixture(filename: str) -> str:
+7 """Load a fixture."""
+8 path = Path(__package__) / "fixtures" / filename
+9 return path.read_text(encoding="utf-8")
+Coverage for tests/test_radio_browser.py: 98% + + + + + ++ ++++ Coverage for tests/test_radio_browser.py: + 98% +
+ ++ 313 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:50 +0000 +
+ ++ + + + diff --git a/coverage-reports/coverage-final/z_c8b1f7e3f131828c_models_py.html b/coverage-reports/coverage-final/z_c8b1f7e3f131828c_models_py.html new file mode 100644 index 00000000..a7fc91a6 --- /dev/null +++ b/coverage-reports/coverage-final/z_c8b1f7e3f131828c_models_py.html @@ -0,0 +1,259 @@ + + + + +1import asyncio
+2import socket
+3from datetime import datetime
+4from unittest.mock import AsyncMock, MagicMock, patch
+ +6import aiohttp
+7import orjson
+8import pytest
+9from aiodns import DNSResolver
+10from awesomeversion import AwesomeVersion
+ +12from radios.const import FilterBy, Order
+13from radios.exceptions import (
+14 RadioBrowserConnectionError,
+15 RadioBrowserConnectionTimeoutError,
+16 RadioBrowserError,
+17)
+18from radios.models import Country, Language, Station, Stats, Tag
+19from radios.radio_browser import RadioBrowser
+ + +22@pytest.fixture
+23def radio_browser():
+24 """Return a RadioBrowser instance."""
+25 return RadioBrowser(user_agent="Test/1.0")
+ + +28@pytest.fixture
+29def mock_dns_resolver():
+30 """Return a mocked DNS resolver."""
+31 resolver = MagicMock(spec=DNSResolver)
+32 result = MagicMock()
+33 result.host = "api.radio-browser.info"
+34 resolver.query.return_value = asyncio.Future()
+35 resolver.query.return_value.set_result([result])
+36 return resolver
+ + +39@pytest.fixture
+40def mock_session():
+41 """Return a mocked aiohttp ClientSession."""
+42 session = AsyncMock(spec=aiohttp.ClientSession)
+43 return session
+ + +46@pytest.fixture
+47def mock_response():
+48 """Return a mocked aiohttp ClientResponse."""
+49 response = AsyncMock()
+50 response.status = 200
+51 response.headers = {"Content-Type": "application/json"}
+52 response.text = AsyncMock(return_value='{"key": "value"}')
+53 return response
+ + +56class TestRadioBrowser:
+57 """Tests for the RadioBrowser class."""
+ +59 @pytest.mark.asyncio
+60 async def test_request_dns_resolution(self, radio_browser, mock_dns_resolver):
+61 """Test that the _request method resolves DNS."""
+62 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+63 with patch.object(radio_browser, "session", AsyncMock()) as mock_session:
+64 mock_response = AsyncMock()
+65 mock_response.headers = {"Content-Type": "application/json"}
+66 mock_response.text.return_value = "{}"
+67 mock_session.request.return_value = mock_response
+ +69 await radio_browser._request("test")
+ +71 mock_dns_resolver.query.assert_called_once_with(
+72 "_api._tcp.radio-browser.info", "SRV"
+73 )
+74 assert radio_browser._host == "api.radio-browser.info"
+ +76 @pytest.mark.asyncio
+77 async def test_request_creates_session_if_none(self, radio_browser, mock_dns_resolver):
+78 """Test that _request creates a session if none exists."""
+79 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+80 with patch("radios.radio_browser.aiohttp.ClientSession") as mock_client_session:
+81 mock_session = AsyncMock()
+82 mock_response = AsyncMock()
+83 mock_response.headers = {"Content-Type": "application/json"}
+84 mock_response.text.return_value = "{}"
+85 mock_session.request.return_value = mock_response
+86 mock_client_session.return_value = mock_session
+ +88 assert radio_browser.session is None
+89 await radio_browser._request("test")
+90 assert radio_browser.session is not None
+91 assert radio_browser._close_session is True
+ +93 @pytest.mark.asyncio
+94 async def test_request_uses_existing_session(self, radio_browser, mock_dns_resolver):
+95 """Test that _request uses an existing session if available."""
+96 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+97 mock_session = AsyncMock()
+98 mock_response = AsyncMock()
+99 mock_response.headers = {"Content-Type": "application/json"}
+100 mock_response.text.return_value = "{}"
+101 mock_session.request.return_value = mock_response
+102 radio_browser.session = mock_session
+103 radio_browser._close_session = False
+ +105 await radio_browser._request("test")
+ +107 mock_session.request.assert_called_once()
+108 assert radio_browser._close_session is False
+ +110 @pytest.mark.asyncio
+111 async def test_request_timeout(self, radio_browser, mock_dns_resolver):
+112 """Test that _request raises RadioBrowserConnectionTimeoutError on timeout."""
+113 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+114 mock_session = AsyncMock()
+115 mock_session.request.side_effect = asyncio.TimeoutError()
+116 radio_browser.session = mock_session
+ +118 with pytest.raises(RadioBrowserConnectionTimeoutError):
+119 await radio_browser._request("test")
+ +121 assert radio_browser._host is None
+ +123 @pytest.mark.asyncio
+124 async def test_request_client_error(self, radio_browser, mock_dns_resolver):
+125 """Test that _request raises RadioBrowserConnectionError on client error."""
+126 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+127 mock_session = AsyncMock()
+128 mock_session.request.side_effect = aiohttp.ClientError()
+129 radio_browser.session = mock_session
+ +131 with pytest.raises(RadioBrowserConnectionError):
+132 await radio_browser._request("test")
+ +134 assert radio_browser._host is None
+ +136 @pytest.mark.asyncio
+137 async def test_request_socket_error(self, radio_browser, mock_dns_resolver):
+138 """Test that _request raises RadioBrowserConnectionError on socket error."""
+139 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+140 mock_session = AsyncMock()
+141 mock_session.request.side_effect = socket.gaierror()
+142 radio_browser.session = mock_session
+ +144 with pytest.raises(RadioBrowserConnectionError):
+145 await radio_browser._request("test")
+ +147 assert radio_browser._host is None
+ +149 @pytest.mark.asyncio
+150 async def test_request_invalid_content_type(self, radio_browser, mock_dns_resolver):
+151 """Test that _request raises RadioBrowserError on invalid content type."""
+152 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+153 mock_session = AsyncMock()
+154 mock_response = AsyncMock()
+155 mock_response.status = 200
+156 mock_response.headers = {"Content-Type": "text/plain"}
+157 mock_response.text.return_value = "Not JSON"
+158 mock_session.request.return_value = mock_response
+159 radio_browser.session = mock_session
+ +161 with pytest.raises(RadioBrowserError):
+162 await radio_browser._request("test")
+ +164 @pytest.mark.asyncio
+165 async def test_request_boolean_params(self, radio_browser, mock_dns_resolver):
+166 """Test that _request converts boolean params to lowercase strings."""
+167 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+168 mock_session = AsyncMock()
+169 mock_response = AsyncMock()
+170 mock_response.headers = {"Content-Type": "application/json"}
+171 mock_response.text.return_value = "{}"
+172 mock_session.request.return_value = mock_response
+173 radio_browser.session = mock_session
+ +175 await radio_browser._request("test", params={"bool_param": True})
+ +177 mock_session.request.assert_called_once()
+178 call_args = mock_session.request.call_args
+179 assert call_args[1]["params"]["bool_param"] == "true"
+ +181 @pytest.mark.asyncio
+182 async def test_stats(self, radio_browser):
+183 """Test the stats method."""
+184 stats_data = {
+185 "supported_version": 1,
+186 "software_version": "2.0.0",
+187 "status": "OK",
+188 "stations": 1000,
+189 "stations_broken": 10,
+190 "tags": 500,
+191 "clicks_last_hour": 100,
+192 "clicks_last_day": 1000,
+193 "languages": 50,
+194 "countries": 100,
+195 }
+ +197 with patch.object(radio_browser, "_request") as mock_request:
+198 mock_request.return_value = orjson.dumps(stats_data)
+ +200 result = await radio_browser.stats()
+ +202 mock_request.assert_called_once_with("stats")
+203 assert isinstance(result, Stats)
+204 assert result.supported_version == 1
+205 assert result.software_version == AwesomeVersion("2.0.0")
+206 assert result.status == "OK"
+207 assert result.stations == 1000
+208 assert result.stations_broken == 10
+209 assert result.tags == 500
+210 assert result.clicks_last_hour == 100
+211 assert result.clicks_last_day == 1000
+212 assert result.languages == 50
+213 assert result.countries == 100
+ +215 @pytest.mark.asyncio
+216 async def test_station_click(self, radio_browser):
+217 """Test the station_click method."""
+218 with patch.object(radio_browser, "_request") as mock_request:
+219 mock_request.return_value = "{}"
+ +221 await radio_browser.station_click(uuid="test-uuid")
+ +223 mock_request.assert_called_once_with("url/test-uuid")
+ +225 @pytest.mark.asyncio
+226 async def test_countries(self, radio_browser):
+227 """Test the countries method with default parameters."""
+228 countries_data = [
+229 {
+230 "name": "US",
+231 "stationcount": "100"
+232 },
+233 {
+234 "name": "GB",
+235 "stationcount": "50"
+236 },
+237 {
+238 "name": "XK", # Kosovo special case
+239 "stationcount": "10"
+240 }
+241 ]
+ +243 with patch.object(radio_browser, "_request") as mock_request:
+244 mock_request.return_value = orjson.dumps(countries_data)
+ +246 result = await radio_browser.countries()
+ +248 mock_request.assert_called_once_with(
+249 "countrycodes",
+250 params={
+251 "hidebroken": False,
+252 "limit": 100000,
+253 "offset": 0,
+254 "order": "name",
+255 "reverse": False,
+256 }
+257 )
+ +259 assert len(result) == 3
+260 assert isinstance(result[0], Country)
+ +262 # Check country name resolution
+263 us_country = next(c for c in result if c.code == "US")
+264 gb_country = next(c for c in result if c.code == "GB")
+265 kosovo_country = next(c for c in result if c.code == "XK")
+ +267 assert us_country.name == "United States"
+268 assert gb_country.name == "United Kingdom"
+269 assert kosovo_country.name == "Kosovo"
+ +271 @pytest.mark.asyncio
+272 async def test_countries_with_custom_parameters(self, radio_browser):
+273 """Test the countries method with custom parameters."""
+274 countries_data = [
+275 {
+276 "name": "US",
+277 "stationcount": "100"
+278 }
+279 ]
+ +281 with patch.object(radio_browser, "_request") as mock_request:
+282 mock_request.return_value = orjson.dumps(countries_data)
+ +284 result = await radio_browser.countries(
+285 hide_broken=True,
+286 limit=10,
+287 offset=5,
+288 order=Order.STATION_COUNT,
+289 reverse=True
+290 )
+ +292 mock_request.assert_called_once_with(
+293 "countrycodes",
+294 params={
+295 "hidebroken": True,
+296 "limit": 10,
+297 "offset": 5,
+298 "order": "stationcount",
+299 "reverse": True,
+300 }
+301 )
+ +303 assert len(result) == 1
+304 assert isinstance(result[0], Country)
+ +306 @pytest.mark.asyncio
+307 async def test_languages(self, radio_browser):
+308 """Test the languages method with default parameters."""
+309 languages_data = [
+310 {
+311 "name": "english",
+312 "iso_639": "en",
+313 "stationcount": "100"
+314 },
+315 {
+316 "name": "spanish",
+317 "iso_639": "es",
+318 "stationcount": "50"
+319 }
+320 ]
+ +322 with patch.object(radio_browser, "_request") as mock_request:
+323 mock_request.return_value = orjson.dumps(languages_data)
+ +325 result = await radio_browser.languages()
+ +327 mock_request.assert_called_once_with(
+328 "languages",
+329 params={
+330 "hidebroken": False,
+331 "limit": 100000,
+332 "offset": 0,
+333 "order": "name",
+334 "reverse": False,
+335 }
+336 )
+ +338 assert len(result) == 2
+339 assert isinstance(result[0], Language)
+ +341 # Check language name capitalization
+342 assert result[0].name == "English"
+343 assert result[1].name == "Spanish"
+344 assert result[0].code == "en"
+345 assert result[1].code == "es"
+346 assert result[0].station_count == "100"
+347 assert result[1].station_count == "50"
+ +349 @pytest.mark.asyncio
+350 async def test_languages_with_custom_parameters(self, radio_browser):
+351 """Test the languages method with custom parameters."""
+352 languages_data = [
+353 {
+354 "name": "english",
+355 "iso_639": "en",
+356 "stationcount": "100"
+357 }
+358 ]
+ +360 with patch.object(radio_browser, "_request") as mock_request:
+361 mock_request.return_value = orjson.dumps(languages_data)
+ +363 result = await radio_browser.languages(
+364 hide_broken=True,
+365 limit=10,
+366 offset=5,
+367 order=Order.STATION_COUNT,
+368 reverse=True
+369 )
+ +371 mock_request.assert_called_once_with(
+372 "languages",
+373 params={
+374 "hidebroken": True,
+375 "limit": 10,
+376 "offset": 5,
+377 "order": "stationcount",
+378 "reverse": True,
+379 }
+380 )
+ +382 assert len(result) == 1
+383 assert isinstance(result[0], Language)
+384 assert result[0].name == "English"
+ +386 @pytest.mark.asyncio
+387 async def test_search_basic(self, radio_browser):
+388 """Test the search method with basic parameters."""
+389 stations_data = [
+390 {
+391 "changeuuid": "change-uuid-1",
+392 "stationuuid": "station-uuid-1",
+393 "name": "Test Station 1",
+394 "url": "http://example.com/stream1",
+395 "url_resolved": "http://example.com/stream1",
+396 "homepage": "http://example.com",
+397 "favicon": "http://example.com/favicon.ico",
+398 "tags": "tag1,tag2",
+399 "country": "United States",
+400 "countrycode": "US",
+401 "state": "California",
+402 "language": "English",
+403 "languagecodes": "en",
+404 "votes": 10,
+405 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+406 "codec": "MP3",
+407 "bitrate": 128,
+408 "hls": False,
+409 "lastcheckok": True,
+410 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+411 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+412 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+413 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+414 "clickcount": 100,
+415 "clicktrend": 1,
+416 "ssl_error": 0,
+417 "geo_lat": 37.7749,
+418 "geo_long": -122.4194,
+419 "has_extended_info": True,
+420 "iso_3166_2": "US-CA"
+421 }
+422 ]
+ +424 with patch.object(radio_browser, "_request") as mock_request:
+425 mock_request.return_value = orjson.dumps(stations_data)
+ +427 result = await radio_browser.search(name="Test")
+ +429 mock_request.assert_called_once_with(
+430 "stations/search",
+431 params={
+432 "hidebroken": False,
+433 "limit": 100000,
+434 "offset": 0,
+435 "order": "name",
+436 "reverse": False,
+437 "name": "Test",
+438 "name_exact": False,
+439 "country": "",
+440 "country_exact": False,
+441 "state_exact": False,
+442 "language_exact": False,
+443 "tag_exact": False,
+444 "bitrate_min": 0,
+445 "bitrate_max": 1000000,
+446 }
+447 )
+ +449 assert len(result) == 1
+450 assert isinstance(result[0], Station)
+451 assert result[0].name == "Test Station 1"
+452 assert result[0].uuid == "station-uuid-1"
+ +454 @pytest.mark.asyncio
+455 async def test_search_with_filter(self, radio_browser):
+456 """Test the search method with filter parameters."""
+457 stations_data = [
+458 {
+459 "changeuuid": "change-uuid-1",
+460 "stationuuid": "station-uuid-1",
+461 "name": "Test Station 1",
+462 "url": "http://example.com/stream1",
+463 "url_resolved": "http://example.com/stream1",
+464 "homepage": "http://example.com",
+465 "favicon": "http://example.com/favicon.ico",
+466 "tags": "tag1,tag2",
+467 "country": "United States",
+468 "countrycode": "US",
+469 "state": "California",
+470 "language": "English",
+471 "languagecodes": "en",
+472 "votes": 10,
+473 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+474 "codec": "MP3",
+475 "bitrate": 128,
+476 "hls": False,
+477 "lastcheckok": True,
+478 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+479 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+480 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+481 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+482 "clickcount": 100,
+483 "clicktrend": 1,
+484 "ssl_error": 0,
+485 "geo_lat": 37.7749,
+486 "geo_long": -122.4194,
+487 "has_extended_info": True,
+488 "iso_3166_2": "US-CA"
+489 }
+490 ]
+ +492 with patch.object(radio_browser, "_request") as mock_request:
+493 mock_request.return_value = orjson.dumps(stations_data)
+ +495 result = await radio_browser.search(
+496 filter_by=FilterBy.TAG,
+497 filter_term="rock",
+498 hide_broken=True,
+499 limit=10,
+500 offset=5,
+501 order=Order.VOTES,
+502 reverse=True,
+503 name_exact=True,
+504 country="US",
+505 country_exact=True,
+506 state_exact=True,
+507 language_exact=True,
+508 tag_exact=True,
+509 bitrate_min=128,
+510 bitrate_max=320
+511 )
+ +513 mock_request.assert_called_once_with(
+514 "stations/search/bytag/rock",
+515 params={
+516 "hidebroken": True,
+517 "limit": 10,
+518 "offset": 5,
+519 "order": "votes",
+520 "reverse": True,
+521 "name": None,
+522 "name_exact": True,
+523 "country": "US",
+524 "country_exact": True,
+525 "state_exact": True,
+526 "language_exact": True,
+527 "tag_exact": True,
+528 "bitrate_min": 128,
+529 "bitrate_max": 320,
+530 }
+531 )
+ +533 assert len(result) == 1
+534 assert isinstance(result[0], Station)
+ +536 @pytest.mark.asyncio
+537 async def test_station_found(self, radio_browser):
+538 """Test the station method when a station is found."""
+539 stations_data = [
+540 {
+541 "changeuuid": "change-uuid-1",
+542 "stationuuid": "test-uuid",
+543 "name": "Test Station",
+544 "url": "http://example.com/stream",
+545 "url_resolved": "http://example.com/stream",
+546 "homepage": "http://example.com",
+547 "favicon": "http://example.com/favicon.ico",
+548 "tags": "tag1,tag2",
+549 "country": "United States",
+550 "countrycode": "US",
+551 "state": "California",
+552 "language": "English",
+553 "languagecodes": "en",
+554 "votes": 10,
+555 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+556 "codec": "MP3",
+557 "bitrate": 128,
+558 "hls": False,
+559 "lastcheckok": True,
+560 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+561 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+562 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+563 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+564 "clickcount": 100,
+565 "clicktrend": 1,
+566 "ssl_error": 0,
+567 "geo_lat": 37.7749,
+568 "geo_long": -122.4194,
+569 "has_extended_info": True,
+570 "iso_3166_2": "US-CA"
+571 }
+572 ]
+ +574 with patch.object(radio_browser, "stations") as mock_stations:
+575 mock_stations.return_value = [Station.from_dict(stations_data[0])]
+ +577 result = await radio_browser.station(uuid="test-uuid")
+ +579 mock_stations.assert_called_once_with(
+580 filter_by=FilterBy.UUID,
+581 filter_term="test-uuid",
+582 limit=1,
+583 )
+ +585 assert isinstance(result, Station)
+586 assert result.uuid == "test-uuid"
+587 assert result.name == "Test Station"
+ +589 @pytest.mark.asyncio
+590 async def test_station_not_found(self, radio_browser):
+591 """Test the station method when a station is not found."""
+592 with patch.object(radio_browser, "stations") as mock_stations:
+593 mock_stations.return_value = []
+ +595 result = await radio_browser.station(uuid="nonexistent-uuid")
+ +597 mock_stations.assert_called_once_with(
+598 filter_by=FilterBy.UUID,
+599 filter_term="nonexistent-uuid",
+600 limit=1,
+601 )
+ +603 assert result is None
+ +605 @pytest.mark.asyncio
+606 async def test_stations_basic(self, radio_browser):
+607 """Test the stations method with basic parameters."""
+608 stations_data = [
+609 {
+610 "changeuuid": "change-uuid-1",
+611 "stationuuid": "station-uuid-1",
+612 "name": "Test Station 1",
+613 "url": "http://example.com/stream1",
+614 "url_resolved": "http://example.com/stream1",
+615 "homepage": "http://example.com",
+616 "favicon": "http://example.com/favicon.ico",
+617 "tags": "tag1,tag2",
+618 "country": "United States",
+619 "countrycode": "US",
+620 "state": "California",
+621 "language": "English",
+622 "languagecodes": "en",
+623 "votes": 10,
+624 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+625 "codec": "MP3",
+626 "bitrate": 128,
+627 "hls": False,
+628 "lastcheckok": True,
+629 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+630 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+631 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+632 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+633 "clickcount": 100,
+634 "clicktrend": 1,
+635 "ssl_error": 0,
+636 "geo_lat": 37.7749,
+637 "geo_long": -122.4194,
+638 "has_extended_info": True,
+639 "iso_3166_2": "US-CA"
+640 }
+641 ]
+ +643 with patch.object(radio_browser, "_request") as mock_request:
+644 mock_request.return_value = orjson.dumps(stations_data)
+ +646 result = await radio_browser.stations()
+ +648 mock_request.assert_called_once_with(
+649 "stations",
+650 params={
+651 "hidebroken": False,
+652 "limit": 100000,
+653 "offset": 0,
+654 "order": "name",
+655 "reverse": False,
+656 }
+657 )
+ +659 assert len(result) == 1
+660 assert isinstance(result[0], Station)
+661 assert result[0].name == "Test Station 1"
+662 assert result[0].uuid == "station-uuid-1"
+ +664 @pytest.mark.asyncio
+665 async def test_stations_with_filter(self, radio_browser):
+666 """Test the stations method with filter parameters."""
+667 stations_data = [
+668 {
+669 "changeuuid": "change-uuid-1",
+670 "stationuuid": "station-uuid-1",
+671 "name": "Test Station 1",
+672 "url": "http://example.com/stream1",
+673 "url_resolved": "http://example.com/stream1",
+674 "homepage": "http://example.com",
+675 "favicon": "http://example.com/favicon.ico",
+676 "tags": "tag1,tag2",
+677 "country": "United States",
+678 "countrycode": "US",
+679 "state": "California",
+680 "language": "English",
+681 "languagecodes": "en",
+682 "votes": 10,
+683 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+684 "codec": "MP3",
+685 "bitrate": 128,
+686 "hls": False,
+687 "lastcheckok": True,
+688 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+689 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+690 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+691 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+692 "clickcount": 100,
+693 "clicktrend": 1,
+694 "ssl_error": 0,
+695 "geo_lat": 37.7749,
+696 "geo_long": -122.4194,
+697 "has_extended_info": True,
+698 "iso_3166_2": "US-CA"
+699 }
+700 ]
+ +702 with patch.object(radio_browser, "_request") as mock_request:
+703 mock_request.return_value = orjson.dumps(stations_data)
+ +705 result = await radio_browser.stations(
+706 filter_by=FilterBy.COUNTRY,
+707 filter_term="US",
+708 hide_broken=True,
+709 limit=10,
+710 offset=5,
+711 order=Order.VOTES,
+712 reverse=True
+713 )
+ +715 mock_request.assert_called_once_with(
+716 "stations/bycountry/US",
+717 params={
+718 "hidebroken": True,
+719 "limit": 10,
+720 "offset": 5,
+721 "order": "votes",
+722 "reverse": True,
+723 }
+724 )
+ +726 assert len(result) == 1
+727 assert isinstance(result[0], Station)
+ +729 @pytest.mark.asyncio
+730 async def test_tags(self, radio_browser):
+731 """Test the tags method with default parameters."""
+732 tags_data = [
+733 {
+734 "name": "rock",
+735 "stationcount": "100"
+736 },
+737 {
+738 "name": "pop",
+739 "stationcount": "50"
+740 }
+741 ]
+ +743 with patch.object(radio_browser, "_request") as mock_request:
+744 mock_request.return_value = orjson.dumps(tags_data)
+ +746 result = await radio_browser.tags()
+ +748 mock_request.assert_called_once_with(
+749 "tags",
+750 params={
+751 "hidebroken": False,
+752 "limit": 100000,
+753 "offset": 0,
+754 "order": "name",
+755 "reverse": False,
+756 }
+757 )
+ +759 assert len(result) == 2
+760 assert isinstance(result[0], Tag)
+761 assert result[0].name == "rock"
+762 assert result[0].station_count == "100"
+763 assert result[1].name == "pop"
+764 assert result[1].station_count == "50"
+ +766 @pytest.mark.asyncio
+767 async def test_tags_with_custom_parameters(self, radio_browser):
+768 """Test the tags method with custom parameters."""
+769 tags_data = [
+770 {
+771 "name": "rock",
+772 "stationcount": "100"
+773 }
+774 ]
+ +776 with patch.object(radio_browser, "_request") as mock_request:
+777 mock_request.return_value = orjson.dumps(tags_data)
+ +779 result = await radio_browser.tags(
+780 hide_broken=True,
+781 limit=10,
+782 offset=5,
+783 order=Order.STATION_COUNT,
+784 reverse=True
+785 )
+ +787 mock_request.assert_called_once_with(
+788 "tags",
+789 params={
+790 "hidebroken": True,
+791 "limit": 10,
+792 "offset": 5,
+793 "order": "stationcount",
+794 "reverse": True,
+795 }
+796 )
+ +798 assert len(result) == 1
+799 assert isinstance(result[0], Tag)
+800 assert result[0].name == "rock"
+801 assert result[0].station_count == "100" # TODO: Fix this assertion
+ +803 @pytest.mark.asyncio
+804 async def test_close(self, radio_browser):
+805 """Test the close method."""
+806 mock_session = AsyncMock()
+807 radio_browser.session = mock_session
+808 radio_browser._close_session = True
+ +810 await radio_browser.close()
+ +812 mock_session.close.assert_called_once()
+ +814 @pytest.mark.asyncio
+815 async def test_close_no_session(self, radio_browser):
+816 """Test the close method when no session exists."""
+817 radio_browser.session = None
+ +819 await radio_browser.close() # Should not raise an exception
+ +821 @pytest.mark.asyncio
+822 async def test_close_not_owned_session(self, radio_browser):
+823 """Test the close method when session is not owned."""
+824 mock_session = AsyncMock()
+825 radio_browser.session = mock_session
+826 radio_browser._close_session = False
+ +828 await radio_browser.close()
+ +830 mock_session.close.assert_not_called()
+ +832 @pytest.mark.asyncio
+833 async def test_aenter(self, radio_browser):
+834 """Test the __aenter__ method."""
+835 result = await radio_browser.__aenter__()
+836 assert result is radio_browser
+ +838 @pytest.mark.asyncio
+839 async def test_aexit(self, radio_browser):
+840 """Test the __aexit__ method."""
+841 with patch.object(radio_browser, "close") as mock_close:
+842 await radio_browser.__aexit__(None, None, None)
+843 mock_close.assert_called_once()
+ +845 @pytest.mark.asyncio
+846 async def test_async_context_manager(self, radio_browser):
+847 """Test using RadioBrowser as an async context manager."""
+848 with patch.object(radio_browser, "close") as mock_close:
+849 async with radio_browser as rb:
+850 assert rb is radio_browser
+ +852 mock_close.assert_called_once()
+Coverage for src/radios/models.py: 86% + + + + + ++ ++++ Coverage for src/radios/models.py: + 86% +
+ ++ 84 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
+ ++ + + + diff --git a/coverage-reports/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html b/coverage-reports/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html new file mode 100644 index 00000000..871c9ea5 --- /dev/null +++ b/coverage-reports/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html @@ -0,0 +1,546 @@ + + + + +1"""Models for the Radio Browser API."""
+ +3# pylint: disable=too-few-public-methods
+4from __future__ import annotations
+ +6from dataclasses import dataclass, field
+7from datetime import datetime
+8from typing import cast
+ +10import pycountry
+11from awesomeversion import AwesomeVersion
+12from mashumaro import field_options
+13from mashumaro.mixins.orjson import DataClassORJSONMixin
+14from mashumaro.types import SerializationStrategy
+ + +17class CommaSeparatedString(SerializationStrategy):
+18 """String serialization strategy to handle comma separated strings."""
+ +20 def serialize(self, value: list[str]) -> str:
+21 """Serialize a list of strings to a comma separated value."""
+22 return ",".join(value)
+ +24 def deserialize(self, value: str) -> list[str]:
+25 """Deserialize a comma separated value to a list of strings."""
+26 return [item.strip() for item in value.split(",")]
+ + +29@dataclass
+30# pylint: disable=too-many-instance-attributes
+31class Stats(DataClassORJSONMixin):
+32 """Object holding the Radio Browser stats."""
+ +34 supported_version: int
+35 software_version: AwesomeVersion
+36 status: str
+37 stations: int
+38 stations_broken: int
+39 tags: int
+40 clicks_last_hour: int
+41 clicks_last_day: int
+42 languages: int
+43 countries: int
+ + +46@dataclass
+47# pylint: disable=too-many-instance-attributes
+48class Station(DataClassORJSONMixin):
+49 """Object information for a station from the Radio Browser."""
+ +51 bitrate: int
+52 change_uuid: str = field(metadata=field_options(alias="changeuuid"))
+53 click_count: int = field(metadata=field_options(alias="clickcount"))
+54 click_timestamp: datetime | None = field(
+55 metadata=field_options(alias="clicktimestamp_iso8601")
+56 )
+57 click_trend: int = field(metadata=field_options(alias="clicktrend"))
+58 codec: str
+59 country_code: str = field(metadata=field_options(alias="countrycode"))
+60 favicon: str
+61 latitude: float | None = field(metadata=field_options(alias="geo_lat"))
+62 longitude: float | None = field(metadata=field_options(alias="geo_long"))
+63 has_extended_info: bool
+64 hls: bool
+65 homepage: str
+66 iso_3166_2: str | None
+67 language: list[str] = field(
+68 metadata=field_options(serialization_strategy=CommaSeparatedString())
+69 )
+70 language_codes: list[str] = field(
+71 metadata=field_options(
+72 alias="languagecodes", serialization_strategy=CommaSeparatedString()
+73 )
+74 )
+75 lastchange_time: datetime | None = field(
+76 metadata=field_options(alias="lastchangetime_iso8601")
+77 )
+78 lastcheckok: bool
+79 last_check_ok_time: datetime | None = field(
+80 metadata=field_options(alias="lastcheckoktime_iso8601")
+81 )
+82 last_check_time: datetime | None = field(
+83 metadata=field_options(alias="lastchecktime_iso8601")
+84 )
+85 last_local_check_time: datetime | None = field(
+86 metadata=field_options(alias="lastlocalchecktime_iso8601")
+87 )
+88 name: str
+89 ssl_error: int
+90 state: str
+91 uuid: str = field(metadata=field_options(alias="stationuuid"))
+92 tags: list[str] = field(
+93 metadata=field_options(serialization_strategy=CommaSeparatedString())
+94 )
+95 url_resolved: str
+96 url: str
+97 votes: int
+ +99 @property
+100 def country(self) -> str | None:
+101 """Return country name of this station.
+ +103 Returns
+104 -------
+105 Country name or None if no country code is set.
+ +107 """
+108 if resolved_country := pycountry.countries.get(alpha_2=self.country_code):
+109 return cast("str", resolved_country.name)
+110 return None
+ + +113@dataclass
+114class Country(DataClassORJSONMixin):
+115 """Object information for a Counbtry from the Radio Browser."""
+ +117 code: str
+118 name: str
+119 station_count: str = field(metadata=field_options(alias="stationcount"))
+ +121 @property
+122 def favicon(self) -> str:
+123 """Return the favicon URL for the country.
+ +125 Returns
+126 -------
+127 URL to the favicon.
+ +129 """
+130 return f"https://flagcdn.com/256x192/{self.code.lower()}.png"
+ + +133@dataclass
+134class Language(DataClassORJSONMixin):
+135 """Object information for a Language from the Radio Browser."""
+ +137 code: str | None = field(metadata=field_options(alias="iso_639"))
+138 name: str
+139 station_count: str = field(metadata=field_options(alias="stationcount"))
+ +141 @property
+142 def favicon(self) -> str | None:
+143 """Return the favicon URL for the language.
+ +145 Returns
+146 -------
+147 URL to the favicon.
+ +149 """
+150 if self.code:
+151 return f"https://flagcdn.com/256x192/{self.code.lower()}.png"
+152 return None
+ + +155@dataclass
+156class Tag(DataClassORJSONMixin):
+157 """Object information for a Tag from the Radio Browser."""
+ +159 name: str
+160 station_count: str = field(metadata=field_options(alias="stationcount"))
+Coverage for src/radios/radio_browser.py: 97% + + + + + ++ ++++ Coverage for src/radios/radio_browser.py: + 97% +
+ ++ 111 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
+ ++ + + + diff --git a/coverage-reports/coverage-initial.json b/coverage-reports/coverage-initial.json new file mode 100644 index 00000000..b431d7e2 --- /dev/null +++ b/coverage-reports/coverage-initial.json @@ -0,0 +1 @@ +{"meta": {"format": 3, "version": "7.8.0", "timestamp": "2025-05-14T09:46:51.624321", "branch_coverage": true, "show_contexts": false}, "files": {"src/radios/__init__.py": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/const.py": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"Order": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "FilterBy": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/exceptions.py": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowserError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionTimeoutError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/models.py": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 84, "percent_covered": 85.22727272727273, "percent_covered_display": "85", "missing_lines": 9, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [22, 26, 108, 109, 110, 130, 150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110], [150, 151], [150, 152]], "functions": {"CommaSeparatedString.serialize": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "CommaSeparatedString.deserialize": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [26], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station.country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"CommaSeparatedString": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22, 26], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Stats": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "Tag": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/radio_browser.py": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 74, 80, 82, 86, 90, 91, 92, 103, 104, 105, 116, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 47, "num_statements": 111, "percent_covered": 35.172413793103445, "percent_covered_display": "35", "missing_lines": 64, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 30}, "missing_lines": [75, 76, 77, 78, 83, 84, 87, 88, 89, 106, 107, 108, 109, 110, 111, 112, 113, 114, 126, 127, 142, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 221, 232, 233, 234, 237, 286, 287, 288, 289, 290, 292, 311, 313, 327, 332, 333, 334, 365, 366, 367, 368, 369, 371, 381, 383, 410, 420, 422, 426, 427, 437, 447], "excluded_lines": [], "executed_branches": [[74, 80], [82, 86], [86, 90], [105, 116]], "missing_branches": [[74, 75], [82, 83], [86, 87], [87, 88], [87, 90], [88, 87], [88, 89], [105, 106], [181, 182], [181, 190], [184, 185], [184, 186], [186, 181], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [289, 292], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [368, 371], [426, -424], [426, 427]], "functions": {"RadioBrowser._request": {"executed_lines": [74, 80, 82, 86, 90, 91, 92, 103, 104, 105, 116], "summary": {"covered_lines": 11, "num_statements": 29, "percent_covered": 36.58536585365854, "percent_covered_display": "37", "missing_lines": 18, "excluded_lines": 0, "num_branches": 12, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 8}, "missing_lines": [75, 76, 77, 78, 83, 84, 87, 88, 89, 106, 107, 108, 109, 110, 111, 112, 113, 114], "excluded_lines": [], "executed_branches": [[74, 80], [82, 86], [86, 90], [105, 116]], "missing_branches": [[74, 75], [82, 83], [86, 87], [87, 88], [87, 90], [88, 87], [88, 89], [105, 106]]}, "RadioBrowser.stats": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [126, 127], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.station_click": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [142], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.countries": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 11, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 11, "excluded_lines": 0, "num_branches": 8, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 8}, "missing_lines": [169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194], "excluded_lines": [], "executed_branches": [], "missing_branches": [[181, 182], [181, 190], [184, 185], [184, 186], [186, 181], [186, 187], [190, 191], [190, 194]]}, "RadioBrowser.languages": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 5, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 5, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [221, 232, 233, 234, 237], "excluded_lines": [], "executed_branches": [], "missing_branches": [[233, 234], [233, 237]]}, "RadioBrowser.search": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 8, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 8, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [286, 287, 288, 289, 290, 292, 311, 313], "excluded_lines": [], "executed_branches": [], "missing_branches": [[287, 288], [287, 292], [289, 290], [289, 292]]}, "RadioBrowser.station": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 4, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 4, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [327, 332, 333, 334], "excluded_lines": [], "executed_branches": [], "missing_branches": [[332, 333], [332, 334]]}, "RadioBrowser.stations": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 8, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 8, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [365, 366, 367, 368, 369, 371, 381, 383], "excluded_lines": [], "executed_branches": [], "missing_branches": [[366, 367], [366, 371], [368, 369], [368, 371]]}, "RadioBrowser.tags": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [410, 420, 422], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.close": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [426, 427], "excluded_lines": [], "executed_branches": [], "missing_branches": [[426, -424], [426, 427]]}, "RadioBrowser.__aenter__": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [437], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.__aexit__": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [447], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowser": {"executed_lines": [74, 80, 82, 86, 90, 91, 92, 103, 104, 105, 116], "summary": {"covered_lines": 11, "num_statements": 75, "percent_covered": 13.761467889908257, "percent_covered_display": "14", "missing_lines": 64, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 30}, "missing_lines": [75, 76, 77, 78, 83, 84, 87, 88, 89, 106, 107, 108, 109, 110, 111, 112, 113, 114, 126, 127, 142, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 221, 232, 233, 234, 237, 286, 287, 288, 289, 290, 292, 311, 313, 327, 332, 333, 334, 365, 366, 367, 368, 369, 371, 381, 383, 410, 420, 422, 426, 427, 437, 447], "excluded_lines": [], "executed_branches": [[74, 80], [82, 86], [86, 90], [105, 116]], "missing_branches": [[74, 75], [82, 83], [86, 87], [87, 88], [87, 90], [88, 87], [88, 89], [105, 106], [181, 182], [181, 190], [184, 185], [184, 186], [186, 181], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [289, 292], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [368, 371], [426, -424], [426, 427]]}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}}, "totals": {"covered_lines": 167, "num_statements": 240, "percent_covered": 61.510791366906474, "percent_covered_display": "62", "missing_lines": 73, "excluded_lines": 0, "num_branches": 38, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 34}} \ No newline at end of file diff --git a/coverage-reports/coverage-post-generation.json b/coverage-reports/coverage-post-generation.json new file mode 100644 index 00000000..1ef8d8e1 --- /dev/null +++ b/coverage-reports/coverage-post-generation.json @@ -0,0 +1 @@ +{"meta": {"format": 3, "version": "7.8.0", "timestamp": "2025-05-14T09:50:02.909090", "branch_coverage": true, "show_contexts": false}, "files": {"src/radios/__init__.py": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/const.py": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"Order": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "FilterBy": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/exceptions.py": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowserError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionTimeoutError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/models.py": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 26, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 76, "num_statements": 84, "percent_covered": 86.36363636363636, "percent_covered_display": "86", "missing_lines": 8, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [22, 108, 109, 110, 130, 150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110], [150, 151], [150, 152]], "functions": {"CommaSeparatedString.serialize": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "CommaSeparatedString.deserialize": {"executed_lines": [26], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station.country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"CommaSeparatedString": {"executed_lines": [26], "summary": {"covered_lines": 1, "num_statements": 2, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Stats": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "Tag": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/radio_browser.py": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 118, 126, 127, 129, 142, 145, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 197, 221, 232, 233, 234, 237, 240, 286, 287, 288, 289, 290, 292, 311, 313, 315, 327, 332, 333, 334, 337, 365, 366, 367, 368, 369, 371, 381, 383, 386, 410, 420, 422, 424, 426, 427, 429, 437, 439, 447], "summary": {"covered_lines": 111, "num_statements": 111, "percent_covered": 97.24137931034483, "percent_covered_display": "97", "missing_lines": 0, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 4}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116], [181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [426, -424], [426, 427]], "missing_branches": [[88, 87], [186, 181], [289, 292], [368, 371]], "functions": {"RadioBrowser._request": {"executed_lines": [74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116], "summary": {"covered_lines": 29, "num_statements": 29, "percent_covered": 97.5609756097561, "percent_covered_display": "98", "missing_lines": 0, "excluded_lines": 0, "num_branches": 12, "num_partial_branches": 1, "covered_branches": 11, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116]], "missing_branches": [[88, 87]]}, "RadioBrowser.stats": {"executed_lines": [126, 127], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.station_click": {"executed_lines": [142], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.countries": {"executed_lines": [169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 94.73684210526316, "percent_covered_display": "95", "missing_lines": 0, "excluded_lines": 0, "num_branches": 8, "num_partial_branches": 1, "covered_branches": 7, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194]], "missing_branches": [[186, 181]]}, "RadioBrowser.languages": {"executed_lines": [221, 232, 233, 234, 237], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[233, 234], [233, 237]], "missing_branches": []}, "RadioBrowser.search": {"executed_lines": [286, 287, 288, 289, 290, 292, 311, 313], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 91.66666666666667, "percent_covered_display": "92", "missing_lines": 0, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 1, "covered_branches": 3, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[287, 288], [287, 292], [289, 290]], "missing_branches": [[289, 292]]}, "RadioBrowser.station": {"executed_lines": [327, 332, 333, 334], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[332, 333], [332, 334]], "missing_branches": []}, "RadioBrowser.stations": {"executed_lines": [365, 366, 367, 368, 369, 371, 381, 383], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 91.66666666666667, "percent_covered_display": "92", "missing_lines": 0, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 1, "covered_branches": 3, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[366, 367], [366, 371], [368, 369]], "missing_branches": [[368, 371]]}, "RadioBrowser.tags": {"executed_lines": [410, 420, 422], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.close": {"executed_lines": [426, 427], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[426, -424], [426, 427]], "missing_branches": []}, "RadioBrowser.__aenter__": {"executed_lines": [437], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.__aexit__": {"executed_lines": [447], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowser": {"executed_lines": [74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 126, 127, 142, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 221, 232, 233, 234, 237, 286, 287, 288, 289, 290, 292, 311, 313, 327, 332, 333, 334, 365, 366, 367, 368, 369, 371, 381, 383, 410, 420, 422, 426, 427, 437, 447], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 96.3302752293578, "percent_covered_display": "96", "missing_lines": 0, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 4}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116], [181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [426, -424], [426, 427]], "missing_branches": [[88, 87], [186, 181], [289, 292], [368, 371]]}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/__init__.py": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 4, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"load_fixture": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 4, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/test_radio_browser.py": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 25, 28, 29, 31, 32, 33, 34, 35, 36, 39, 40, 46, 47, 56, 57, 59, 60, 62, 63, 64, 65, 66, 67, 69, 71, 74, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108, 110, 111, 113, 114, 115, 116, 118, 119, 121, 123, 124, 126, 127, 128, 129, 131, 132, 134, 136, 137, 139, 140, 141, 142, 144, 145, 147, 149, 150, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 164, 165, 167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179, 181, 182, 184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 215, 216, 218, 219, 221, 223, 225, 226, 228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269, 271, 272, 274, 281, 282, 284, 292, 303, 304, 306, 307, 309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347, 349, 350, 352, 360, 361, 363, 371, 382, 383, 384, 386, 387, 389, 424, 425, 427, 429, 449, 450, 451, 452, 454, 455, 457, 492, 493, 495, 513, 533, 534, 536, 537, 539, 574, 575, 577, 579, 585, 586, 587, 589, 590, 592, 593, 595, 597, 603, 605, 606, 608, 643, 644, 646, 648, 659, 660, 661, 662, 664, 665, 667, 702, 703, 705, 715, 726, 727, 729, 730, 732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764, 766, 767, 769, 776, 777, 779, 787, 798, 799, 800, 801, 803, 804, 806, 807, 808, 810, 812, 814, 815, 817, 819, 821, 822, 824, 825, 826, 828, 830, 832, 833, 835, 836, 838, 839, 841, 842, 843, 845, 846, 848, 849, 850, 852], "summary": {"covered_lines": 306, "num_statements": 313, "percent_covered": 97.76357827476038, "percent_covered_display": "98", "missing_lines": 7, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43, 49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"radio_browser": {"executed_lines": [25], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_dns_resolver": {"executed_lines": [31, 32, 33, 34, 35, 36], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_session": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_response": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 5, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 5, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_dns_resolution": {"executed_lines": [62, 63, 64, 65, 66, 67, 69, 71, 74], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_creates_session_if_none": {"executed_lines": [79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91], "summary": {"covered_lines": 12, "num_statements": 12, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_uses_existing_session": {"executed_lines": [96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_timeout": {"executed_lines": [113, 114, 115, 116, 118, 119, 121], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_client_error": {"executed_lines": [126, 127, 128, 129, 131, 132, 134], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_socket_error": {"executed_lines": [139, 140, 141, 142, 144, 145, 147], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_invalid_content_type": {"executed_lines": [152, 153, 154, 155, 156, 157, 158, 159, 161, 162], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_boolean_params": {"executed_lines": [167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stats": {"executed_lines": [184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "summary": {"covered_lines": 16, "num_statements": 16, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_click": {"executed_lines": [218, 219, 221, 223], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_countries": {"executed_lines": [228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269], "summary": {"covered_lines": 13, "num_statements": 13, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_countries_with_custom_parameters": {"executed_lines": [274, 281, 282, 284, 292, 303, 304], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_languages": {"executed_lines": [309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347], "summary": {"covered_lines": 13, "num_statements": 13, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_languages_with_custom_parameters": {"executed_lines": [352, 360, 361, 363, 371, 382, 383, 384], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_search_basic": {"executed_lines": [389, 424, 425, 427, 429, 449, 450, 451, 452], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_search_with_filter": {"executed_lines": [457, 492, 493, 495, 513, 533, 534], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_found": {"executed_lines": [539, 574, 575, 577, 579, 585, 586, 587], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_not_found": {"executed_lines": [592, 593, 595, 597, 603], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stations_basic": {"executed_lines": [608, 643, 644, 646, 648, 659, 660, 661, 662], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stations_with_filter": {"executed_lines": [667, 702, 703, 705, 715, 726, 727], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_tags": {"executed_lines": [732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_tags_with_custom_parameters": {"executed_lines": [769, 776, 777, 779, 787, 798, 799, 800, 801], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close": {"executed_lines": [806, 807, 808, 810, 812], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close_no_session": {"executed_lines": [817, 819], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close_not_owned_session": {"executed_lines": [824, 825, 826, 828, 830], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_aenter": {"executed_lines": [835, 836], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_aexit": {"executed_lines": [841, 842, 843], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_async_context_manager": {"executed_lines": [848, 849, 850, 852], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 28, 29, 39, 40, 46, 47, 56, 57, 59, 60, 76, 77, 93, 94, 110, 111, 123, 124, 136, 137, 149, 150, 164, 165, 181, 182, 215, 216, 225, 226, 271, 272, 306, 307, 349, 350, 386, 387, 454, 455, 536, 537, 589, 590, 605, 606, 664, 665, 729, 730, 766, 767, 803, 804, 814, 815, 821, 822, 832, 833, 838, 839, 845, 846], "summary": {"covered_lines": 78, "num_statements": 78, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"TestRadioBrowser": {"executed_lines": [62, 63, 64, 65, 66, 67, 69, 71, 74, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108, 113, 114, 115, 116, 118, 119, 121, 126, 127, 128, 129, 131, 132, 134, 139, 140, 141, 142, 144, 145, 147, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179, 184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 218, 219, 221, 223, 228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269, 274, 281, 282, 284, 292, 303, 304, 309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347, 352, 360, 361, 363, 371, 382, 383, 384, 389, 424, 425, 427, 429, 449, 450, 451, 452, 457, 492, 493, 495, 513, 533, 534, 539, 574, 575, 577, 579, 585, 586, 587, 592, 593, 595, 597, 603, 608, 643, 644, 646, 648, 659, 660, 661, 662, 667, 702, 703, 705, 715, 726, 727, 732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764, 769, 776, 777, 779, 787, 798, 799, 800, 801, 806, 807, 808, 810, 812, 817, 819, 824, 825, 826, 828, 830, 835, 836, 841, 842, 843, 848, 849, 850, 852], "summary": {"covered_lines": 221, "num_statements": 221, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 25, 28, 29, 31, 32, 33, 34, 35, 36, 39, 40, 46, 47, 56, 57, 59, 60, 76, 77, 93, 94, 110, 111, 123, 124, 136, 137, 149, 150, 164, 165, 181, 182, 215, 216, 225, 226, 271, 272, 306, 307, 349, 350, 386, 387, 454, 455, 536, 537, 589, 590, 605, 606, 664, 665, 729, 730, 766, 767, 803, 804, 814, 815, 821, 822, 832, 833, 838, 839, 845, 846], "summary": {"covered_lines": 85, "num_statements": 92, "percent_covered": 92.3913043478261, "percent_covered_display": "92", "missing_lines": 7, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43, 49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/test_radios.py": {"executed_lines": [1, 4, 5, 7, 10, 12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"test_json_request": {"executed_lines": [12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 7, 10], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 4, 5, 7, 10, 12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}}, "totals": {"covered_lines": 550, "num_statements": 567, "percent_covered": 95.86776859504133, "percent_covered_display": "96", "missing_lines": 17, "excluded_lines": 0, "num_branches": 38, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 8}} \ No newline at end of file diff --git a/test-results/COVERAGE_SUMMARY.md b/test-results/COVERAGE_SUMMARY.md new file mode 100644 index 00000000..6436f9f5 --- /dev/null +++ b/test-results/COVERAGE_SUMMARY.md @@ -0,0 +1,10 @@ +# Coverage Summary + +**Initial Coverage**: 61.5% +**Final Coverage**: 95.9% +**Improvement**: 34.4% + +## Coverage Improvements by File + +- `src/radios/models.py`: 85.2% → 86.4% +- `src/radios/radio_browser.py`: 35.2% → 97.2% diff --git a/test-results/api_interaction_logs.json b/test-results/api_interaction_logs.json new file mode 100644 index 00000000..4818f69f --- /dev/null +++ b/test-results/api_interaction_logs.json @@ -0,0 +1,2 @@ +[] +{"timestamp": 1747216013.8377507, "file": "src/radios/radio_browser.py", "prompt_length": 32322, "model": "anthropic/claude-3.7-sonnet", "response_length": 31987, "clean_code_length": 31927, "generation_time": 161.9262673854828, "success": true, "token_usage": {"prompt_tokens": 8696, "completion_tokens": 8493, "total_tokens": 17189}} diff --git a/test-results/coverage-analysis.json b/test-results/coverage-analysis.json new file mode 100644 index 00000000..1b36ea8e --- /dev/null +++ b/test-results/coverage-analysis.json @@ -0,0 +1,16 @@ +{ + "improvements": [ + { + "file": "src/radios/models.py", + "from": 85.22727272727273, + "to": 86.36363636363636 + }, + { + "file": "src/radios/radio_browser.py", + "from": 35.172413793103445, + "to": 97.24137931034483 + } + ], + "still_low": [], + "failed_tests": [] +} \ No newline at end of file diff --git a/test-results/coverage-final/class_index.html b/test-results/coverage-final/class_index.html new file mode 100644 index 00000000..9f758809 --- /dev/null +++ b/test-results/coverage-final/class_index.html @@ -0,0 +1,164 @@ + + + + +1"""Asynchronous Python client for the Radio Browser API."""
+ +3from __future__ import annotations
+ +5import asyncio
+6import random
+7import socket
+8from dataclasses import dataclass
+9from typing import Any, Self
+ +11import aiohttp
+12import backoff
+13import orjson
+14import pycountry
+15from aiodns import DNSResolver
+16from aiohttp import hdrs
+17from yarl import URL
+ +19from .const import FilterBy, Order
+20from .exceptions import (
+21 RadioBrowserConnectionError,
+22 RadioBrowserConnectionTimeoutError,
+23 RadioBrowserError,
+24)
+25from .models import Country, Language, Station, Stats, Tag
+ + +28@dataclass
+29class RadioBrowser:
+30 """Main class for handling connections with the Radio Browser API."""
+ +32 user_agent: str
+ +34 request_timeout: float = 8.0
+35 session: aiohttp.client.ClientSession | None = None
+ +37 _close_session: bool = False
+38 _host: str | None = None
+ +40 @backoff.on_exception(
+41 backoff.expo, RadioBrowserConnectionError, max_tries=5, logger=None
+42 )
+43 async def _request(
+44 self,
+45 uri: str = "",
+46 method: str = hdrs.METH_GET,
+47 params: dict[str, Any] | None = None,
+48 ) -> str:
+49 """Handle a request to the Radio Browser API.
+ +51 A generic method for sending/handling HTTP requests done against
+52 the Radio Browser API.
+ +54 Args:
+55 ----
+56 uri: Request URI, for example `stats`.
+57 method: HTTP method to use for the request.E.g., "GET" or "POST".
+58 params: Dictionary of data to send to the Radio Browser API.
+ +60 Returns:
+61 -------
+62 The response from the Radio Browser API.
+ +64 Raises:
+65 ------
+66 RadioBrowserConnectionError: An error occurred while communication with
+67 the Radio Browser API.
+68 RadioBrowserConnectionTimeoutError: A timeout occurred while communicating
+69 with the Radio Browser API.
+70 RadioBrowserError: Received an unexpected response from the
+71 Radio Browser API.
+ +73 """
+74 if self._host is None:
+75 resolver = DNSResolver()
+76 result = await resolver.query("_api._tcp.radio-browser.info", "SRV")
+77 random.shuffle(result)
+78 self._host = result[0].host
+ +80 url = URL.build(scheme="https", host=self._host, path="/json/").join(URL(uri))
+ +82 if self.session is None:
+83 self.session = aiohttp.ClientSession()
+84 self._close_session = True
+ +86 if params:
+87 for key, value in params.items():
+88 if isinstance(value, bool): 88 ↛ 87line 88 didn't jump to line 87 because the condition on line 88 was always true
+89 params[key] = str(value).lower()
+90 try:
+91 async with asyncio.timeout(self.request_timeout):
+92 response = await self.session.request(
+93 method,
+94 url,
+95 headers={
+96 "User-Agent": self.user_agent,
+97 "Accept": "application/json",
+98 },
+99 params=params,
+100 raise_for_status=True,
+101 )
+ +103 content_type = response.headers.get("Content-Type", "")
+104 text = await response.text()
+105 if "application/json" not in content_type:
+106 raise RadioBrowserError(response.status, {"message": text})
+107 except asyncio.TimeoutError as exception:
+108 self._host = None
+109 msg = "Timeout occurred while connecting to the Radio Browser API"
+110 raise RadioBrowserConnectionTimeoutError(msg) from exception
+111 except (aiohttp.ClientError, socket.gaierror) as exception:
+112 self._host = None
+113 msg = "Error occurred while communicating with the Radio Browser API"
+114 raise RadioBrowserConnectionError(msg) from exception
+ +116 return text
+ +118 async def stats(self) -> Stats:
+119 """Get Radio Browser service stats.
+ +121 Returns
+122 -------
+123 A Stats object, with information about the Radio Browser API.
+ +125 """
+126 response = await self._request("stats")
+127 return Stats.from_json(response)
+ +129 async def station_click(self, *, uuid: str) -> None:
+130 """Register click on a station.
+ +132 Increase the click count of a station by one. This should be called
+133 every time when a user starts playing a stream to mark the stream more
+134 popular than others. Every call to this endpoint from the same IP
+135 address and for the same station only gets counted once per day.
+ +137 Args:
+138 ----
+139 uuid: UUID of the station.
+ +141 """
+142 await self._request(f"url/{uuid}")
+ +144 # pylint: disable-next=too-many-arguments
+145 async def countries(
+146 self,
+147 *,
+148 hide_broken: bool = False,
+149 limit: int = 100000,
+150 offset: int = 0,
+151 order: Order = Order.NAME,
+152 reverse: bool = False,
+153 ) -> list[Country]:
+154 """Get list of available countries.
+ +156 Args:
+157 ----
+158 hide_broken: Do not count broken stations.
+159 limit: Limit the number of results.
+160 offset: Offset the results.
+161 order: Order the results.
+162 reverse: Reverse the order of the results.
+ +164 Returns:
+165 -------
+166 A Stats object, with information about the Radio Browser API.
+ +168 """
+169 countries_data = await self._request(
+170 "countrycodes",
+171 params={
+172 "hidebroken": hide_broken,
+173 "limit": limit,
+174 "offset": offset,
+175 "order": order.value,
+176 "reverse": reverse,
+177 },
+178 )
+ +180 countries = orjson.loads(countries_data) # pylint: disable=no-member
+181 for country in countries: # pylint: disable=not-an-iterable
+182 country["code"] = country["name"]
+183 # https://github.com/frenck/python-radios/issues/19
+184 if country["name"] == "XK":
+185 country["name"] = "Kosovo"
+186 elif resolved_country := pycountry.countries.get(alpha_2=country["name"]): 186 ↛ 181line 186 didn't jump to line 181 because the condition on line 186 was always true
+187 country["name"] = resolved_country.name
+ +189 # Because we enrichted the countries we need to re-order in this case
+190 if order == Order.NAME:
+191 countries.sort(key=lambda country: country["name"])
+ +193 # pylint: disable-next=not-an-iterable
+194 return [Country.from_dict(country) for country in countries]
+ +196 # pylint: disable-next=too-many-arguments
+197 async def languages(
+198 self,
+199 *,
+200 hide_broken: bool = False,
+201 limit: int = 100000,
+202 offset: int = 0,
+203 order: Order = Order.NAME,
+204 reverse: bool = False,
+205 ) -> list[Language]:
+206 """Get list of available languages.
+ +208 Args:
+209 ----
+210 hide_broken: Do not count broken stations.
+211 limit: Limit the number of results.
+212 offset: Offset the results.
+213 order: Order the results.
+214 reverse: Reverse the order of the results.
+ +216 Returns:
+217 -------
+218 A list of Language objects.
+ +220 """
+221 languages_data = await self._request(
+222 "languages",
+223 params={
+224 "hidebroken": hide_broken,
+225 "offset": offset,
+226 "order": order.value,
+227 "reverse": reverse,
+228 "limit": limit,
+229 },
+230 )
+ +232 languages = orjson.loads(languages_data) # pylint: disable=no-member
+233 for language in languages: # pylint: disable=not-an-iterable
+234 language["name"] = language["name"].title()
+ +236 # pylint: disable-next=not-an-iterable
+237 return [Language.from_dict(language) for language in languages]
+ +239 # pylint: disable-next=too-many-arguments, too-many-locals
+240 async def search( # noqa: PLR0913
+241 self,
+242 *,
+243 filter_by: FilterBy | None = None,
+244 filter_term: str | None = None,
+245 hide_broken: bool = False,
+246 limit: int = 100000,
+247 offset: int = 0,
+248 order: Order = Order.NAME,
+249 reverse: bool = False,
+250 name: str | None = None,
+251 name_exact: bool = False,
+252 country: str | None = "",
+253 country_exact: bool = False,
+254 state_exact: bool = False,
+255 language_exact: bool = False,
+256 tag_exact: bool = False,
+257 bitrate_min: int = 0,
+258 bitrate_max: int = 1000000,
+259 ) -> list[Station]:
+260 """Get list of radio stations.
+ +262 Args:
+263 ----
+264 filter_by: Filter the results by a specific field.
+265 filter_term: Search term to filter the results.
+266 hide_broken: Do not count broken stations.
+267 limit: Limit the number of results.
+268 offset: Offset the results.
+269 order: Order the results.
+270 reverse: Reverse the order of the results.
+271 name: Search by name.
+272 name_exact: Search by exact name.
+273 country: Search by country.
+274 country_exact: Search by exact country.
+275 state_exact: Search by exact state.
+276 language_exact: Search by exact language.
+277 tag_exact: Search by exact tag.
+278 bitrate_min: Search by minimum bitrate.
+279 bitrate_max: Search by maximum bitrate.
+ +281 Returns:
+282 -------
+283 A list of Station objects.
+ +285 """
+286 uri = "stations/search"
+287 if filter_by is not None:
+288 uri = f"{uri}/{filter_by.value}"
+289 if filter_term is not None: 289 ↛ 292line 289 didn't jump to line 292 because the condition on line 289 was always true
+290 uri = f"{uri}/{filter_term}"
+ +292 stations_data = await self._request(
+293 uri,
+294 params={
+295 "hidebroken": hide_broken,
+296 "offset": offset,
+297 "order": order.value,
+298 "reverse": reverse,
+299 "limit": limit,
+300 "name": name,
+301 "name_exact": name_exact,
+302 "country": country,
+303 "country_exact": country_exact,
+304 "state_exact": state_exact,
+305 "language_exact": language_exact,
+306 "tag_exact": tag_exact,
+307 "bitrate_min": bitrate_min,
+308 "bitrate_max": bitrate_max,
+309 },
+310 )
+311 stations = orjson.loads(stations_data) # pylint: disable=no-member
+312 # pylint: disable-next=not-an-iterable
+313 return [Station.from_dict(station) for station in stations]
+ +315 async def station(self, *, uuid: str) -> Station | None:
+316 """Get station by UUID.
+ +318 Args:
+319 ----
+320 uuid: UUID of the station.
+ +322 Returns:
+323 -------
+324 A Station object if found.
+ +326 """
+327 stations = await self.stations(
+328 filter_by=FilterBy.UUID,
+329 filter_term=uuid,
+330 limit=1,
+331 )
+332 if not stations:
+333 return None
+334 return stations[0]
+ +336 # pylint: disable-next=too-many-arguments
+337 async def stations( # noqa: PLR0913
+338 self,
+339 *,
+340 filter_by: FilterBy | None = None,
+341 filter_term: str | None = None,
+342 hide_broken: bool = False,
+343 limit: int = 100000,
+344 offset: int = 0,
+345 order: Order = Order.NAME,
+346 reverse: bool = False,
+347 ) -> list[Station]:
+348 """Get list of radio stations.
+ +350 Args:
+351 ----
+352 filter_by: Filter the results by a specific field.
+353 filter_term: Search term to filter the results.
+354 hide_broken: Do not count broken stations.
+355 limit: Limit the number of results.
+356 offset: Offset the results.
+357 order: Order the results.
+358 reverse: Reverse the order of the results.
+ +360 Returns:
+361 -------
+362 A list of Station objects.
+ +364 """
+365 uri = "stations"
+366 if filter_by is not None:
+367 uri = f"{uri}/{filter_by.value}"
+368 if filter_term is not None: 368 ↛ 371line 368 didn't jump to line 371 because the condition on line 368 was always true
+369 uri = f"{uri}/{filter_term}"
+ +371 stations_data = await self._request(
+372 uri,
+373 params={
+374 "hidebroken": hide_broken,
+375 "offset": offset,
+376 "order": order.value,
+377 "reverse": reverse,
+378 "limit": limit,
+379 },
+380 )
+381 stations = orjson.loads(stations_data) # pylint: disable=no-member
+382 # pylint: disable-next=not-an-iterable
+383 return [Station.from_dict(station) for station in stations]
+ +385 # pylint: disable-next=too-many-arguments
+386 async def tags(
+387 self,
+388 *,
+389 hide_broken: bool = False,
+390 limit: int = 100000,
+391 offset: int = 0,
+392 order: Order = Order.NAME,
+393 reverse: bool = False,
+394 ) -> list[Tag]:
+395 """Get list of available tags.
+ +397 Args:
+398 ----
+399 hide_broken: Do not count broken stations.
+400 limit: Limit the number of results.
+401 offset: Offset the results.
+402 order: Order the results.
+403 reverse: Reverse the order of the results.
+ +405 Returns:
+406 -------
+407 A list of Tags objects.
+ +409 """
+410 tags_data = await self._request(
+411 "tags",
+412 params={
+413 "hidebroken": hide_broken,
+414 "offset": offset,
+415 "order": order.value,
+416 "reverse": reverse,
+417 "limit": limit,
+418 },
+419 )
+420 tags = orjson.loads(tags_data) # pylint: disable=no-member
+421 # pylint: disable-next=not-an-iterable
+422 return [Tag.from_dict(tag) for tag in tags]
+ +424 async def close(self) -> None:
+425 """Close open client session."""
+426 if self.session and self._close_session:
+427 await self.session.close()
+ +429 async def __aenter__(self) -> Self:
+430 """Async enter.
+ +432 Returns
+433 -------
+434 The RadioBrowser object.
+ +436 """
+437 return self
+ +439 async def __aexit__(self, *_exc_info: object) -> None:
+440 """Async exit.
+ +442 Args:
+443 ----
+444 _exc_info: Exec type.
+ +446 """
+447 await self.close()
+Coverage report + + + + + ++ +++Coverage report: + 93% +
+ + ++ Files + Functions + Classes +
++ coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
++ + + + diff --git a/test-results/coverage-final/coverage.json b/test-results/coverage-final/coverage.json new file mode 100644 index 00000000..b002f44b --- /dev/null +++ b/test-results/coverage-final/coverage.json @@ -0,0 +1 @@ +{"meta": {"format": 3, "version": "7.8.0", "timestamp": "2025-05-14T09:50:30.235564", "branch_coverage": true, "show_contexts": false}, "files": {"src/radios/__init__.py": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/const.py": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"Order": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "FilterBy": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/exceptions.py": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowserError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionTimeoutError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/models.py": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 26, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 76, "num_statements": 84, "percent_covered": 86.36363636363636, "percent_covered_display": "86", "missing_lines": 8, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [22, 108, 109, 110, 130, 150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110], [150, 151], [150, 152]], "functions": {"CommaSeparatedString.serialize": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "CommaSeparatedString.deserialize": {"executed_lines": [26], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station.country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"CommaSeparatedString": {"executed_lines": [26], "summary": {"covered_lines": 1, "num_statements": 2, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Stats": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "Tag": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/radio_browser.py": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 118, 126, 127, 129, 142, 145, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 197, 221, 232, 233, 234, 237, 240, 286, 287, 288, 289, 290, 292, 311, 313, 315, 327, 332, 333, 334, 337, 365, 366, 367, 368, 369, 371, 381, 383, 386, 410, 420, 422, 424, 426, 427, 429, 437, 439, 447], "summary": {"covered_lines": 111, "num_statements": 111, "percent_covered": 97.24137931034483, "percent_covered_display": "97", "missing_lines": 0, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 4}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116], [181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [426, -424], [426, 427]], "missing_branches": [[88, 87], [186, 181], [289, 292], [368, 371]], "functions": {"RadioBrowser._request": {"executed_lines": [74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116], "summary": {"covered_lines": 29, "num_statements": 29, "percent_covered": 97.5609756097561, "percent_covered_display": "98", "missing_lines": 0, "excluded_lines": 0, "num_branches": 12, "num_partial_branches": 1, "covered_branches": 11, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116]], "missing_branches": [[88, 87]]}, "RadioBrowser.stats": {"executed_lines": [126, 127], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.station_click": {"executed_lines": [142], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.countries": {"executed_lines": [169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 94.73684210526316, "percent_covered_display": "95", "missing_lines": 0, "excluded_lines": 0, "num_branches": 8, "num_partial_branches": 1, "covered_branches": 7, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194]], "missing_branches": [[186, 181]]}, "RadioBrowser.languages": {"executed_lines": [221, 232, 233, 234, 237], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[233, 234], [233, 237]], "missing_branches": []}, "RadioBrowser.search": {"executed_lines": [286, 287, 288, 289, 290, 292, 311, 313], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 91.66666666666667, "percent_covered_display": "92", "missing_lines": 0, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 1, "covered_branches": 3, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[287, 288], [287, 292], [289, 290]], "missing_branches": [[289, 292]]}, "RadioBrowser.station": {"executed_lines": [327, 332, 333, 334], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[332, 333], [332, 334]], "missing_branches": []}, "RadioBrowser.stations": {"executed_lines": [365, 366, 367, 368, 369, 371, 381, 383], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 91.66666666666667, "percent_covered_display": "92", "missing_lines": 0, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 1, "covered_branches": 3, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[366, 367], [366, 371], [368, 369]], "missing_branches": [[368, 371]]}, "RadioBrowser.tags": {"executed_lines": [410, 420, 422], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.close": {"executed_lines": [426, 427], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[426, -424], [426, 427]], "missing_branches": []}, "RadioBrowser.__aenter__": {"executed_lines": [437], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.__aexit__": {"executed_lines": [447], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowser": {"executed_lines": [74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 126, 127, 142, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 221, 232, 233, 234, 237, 286, 287, 288, 289, 290, 292, 311, 313, 327, 332, 333, 334, 365, 366, 367, 368, 369, 371, 381, 383, 410, 420, 422, 426, 427, 437, 447], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 96.3302752293578, "percent_covered_display": "96", "missing_lines": 0, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 4}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116], [181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [426, -424], [426, 427]], "missing_branches": [[88, 87], [186, 181], [289, 292], [368, 371]]}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/__init__.py": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 4, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"load_fixture": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 4, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/test_radio_browser.py": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 25, 28, 29, 31, 32, 33, 34, 35, 36, 39, 40, 46, 47, 56, 57, 59, 60, 62, 63, 64, 65, 66, 67, 69, 71, 74, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108, 110, 111, 113, 114, 115, 116, 118, 119, 121, 123, 124, 126, 127, 128, 129, 131, 132, 134, 136, 137, 139, 140, 141, 142, 144, 145, 147, 149, 150, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 164, 165, 167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179, 181, 182, 184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 215, 216, 218, 219, 221, 223, 225, 226, 228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269, 271, 272, 274, 281, 282, 284, 292, 303, 304, 306, 307, 309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347, 349, 350, 352, 360, 361, 363, 371, 382, 383, 384, 386, 387, 389, 424, 425, 427, 429, 449, 450, 451, 452, 454, 455, 457, 492, 493, 495, 513, 533, 534, 536, 537, 539, 574, 575, 577, 579, 585, 586, 587, 589, 590, 592, 593, 595, 597, 603, 605, 606, 608, 643, 644, 646, 648, 659, 660, 661, 662, 664, 665, 667, 702, 703, 705, 715, 726, 727, 729, 730, 732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764, 766, 767, 769, 776, 777, 779, 787, 798, 799, 800, 801, 803, 804, 806, 807, 808, 810, 812, 814, 815, 817, 819, 821, 822, 824, 825, 826, 828, 830, 832, 833, 835, 836, 838, 839, 841, 842, 843, 845, 846, 848, 849, 850, 852], "summary": {"covered_lines": 306, "num_statements": 313, "percent_covered": 97.76357827476038, "percent_covered_display": "98", "missing_lines": 7, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43, 49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"radio_browser": {"executed_lines": [25], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_dns_resolver": {"executed_lines": [31, 32, 33, 34, 35, 36], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_session": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_response": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 5, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 5, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_dns_resolution": {"executed_lines": [62, 63, 64, 65, 66, 67, 69, 71, 74], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_creates_session_if_none": {"executed_lines": [79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91], "summary": {"covered_lines": 12, "num_statements": 12, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_uses_existing_session": {"executed_lines": [96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_timeout": {"executed_lines": [113, 114, 115, 116, 118, 119, 121], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_client_error": {"executed_lines": [126, 127, 128, 129, 131, 132, 134], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_socket_error": {"executed_lines": [139, 140, 141, 142, 144, 145, 147], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_invalid_content_type": {"executed_lines": [152, 153, 154, 155, 156, 157, 158, 159, 161, 162], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_boolean_params": {"executed_lines": [167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stats": {"executed_lines": [184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "summary": {"covered_lines": 16, "num_statements": 16, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_click": {"executed_lines": [218, 219, 221, 223], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_countries": {"executed_lines": [228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269], "summary": {"covered_lines": 13, "num_statements": 13, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_countries_with_custom_parameters": {"executed_lines": [274, 281, 282, 284, 292, 303, 304], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_languages": {"executed_lines": [309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347], "summary": {"covered_lines": 13, "num_statements": 13, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_languages_with_custom_parameters": {"executed_lines": [352, 360, 361, 363, 371, 382, 383, 384], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_search_basic": {"executed_lines": [389, 424, 425, 427, 429, 449, 450, 451, 452], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_search_with_filter": {"executed_lines": [457, 492, 493, 495, 513, 533, 534], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_found": {"executed_lines": [539, 574, 575, 577, 579, 585, 586, 587], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_not_found": {"executed_lines": [592, 593, 595, 597, 603], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stations_basic": {"executed_lines": [608, 643, 644, 646, 648, 659, 660, 661, 662], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stations_with_filter": {"executed_lines": [667, 702, 703, 705, 715, 726, 727], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_tags": {"executed_lines": [732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_tags_with_custom_parameters": {"executed_lines": [769, 776, 777, 779, 787, 798, 799, 800, 801], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close": {"executed_lines": [806, 807, 808, 810, 812], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close_no_session": {"executed_lines": [817, 819], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close_not_owned_session": {"executed_lines": [824, 825, 826, 828, 830], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_aenter": {"executed_lines": [835, 836], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_aexit": {"executed_lines": [841, 842, 843], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_async_context_manager": {"executed_lines": [848, 849, 850, 852], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 28, 29, 39, 40, 46, 47, 56, 57, 59, 60, 76, 77, 93, 94, 110, 111, 123, 124, 136, 137, 149, 150, 164, 165, 181, 182, 215, 216, 225, 226, 271, 272, 306, 307, 349, 350, 386, 387, 454, 455, 536, 537, 589, 590, 605, 606, 664, 665, 729, 730, 766, 767, 803, 804, 814, 815, 821, 822, 832, 833, 838, 839, 845, 846], "summary": {"covered_lines": 78, "num_statements": 78, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"TestRadioBrowser": {"executed_lines": [62, 63, 64, 65, 66, 67, 69, 71, 74, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108, 113, 114, 115, 116, 118, 119, 121, 126, 127, 128, 129, 131, 132, 134, 139, 140, 141, 142, 144, 145, 147, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179, 184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 218, 219, 221, 223, 228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269, 274, 281, 282, 284, 292, 303, 304, 309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347, 352, 360, 361, 363, 371, 382, 383, 384, 389, 424, 425, 427, 429, 449, 450, 451, 452, 457, 492, 493, 495, 513, 533, 534, 539, 574, 575, 577, 579, 585, 586, 587, 592, 593, 595, 597, 603, 608, 643, 644, 646, 648, 659, 660, 661, 662, 667, 702, 703, 705, 715, 726, 727, 732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764, 769, 776, 777, 779, 787, 798, 799, 800, 801, 806, 807, 808, 810, 812, 817, 819, 824, 825, 826, 828, 830, 835, 836, 841, 842, 843, 848, 849, 850, 852], "summary": {"covered_lines": 221, "num_statements": 221, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 25, 28, 29, 31, 32, 33, 34, 35, 36, 39, 40, 46, 47, 56, 57, 59, 60, 76, 77, 93, 94, 110, 111, 123, 124, 136, 137, 149, 150, 164, 165, 181, 182, 215, 216, 225, 226, 271, 272, 306, 307, 349, 350, 386, 387, 454, 455, 536, 537, 589, 590, 605, 606, 664, 665, 729, 730, 766, 767, 803, 804, 814, 815, 821, 822, 832, 833, 838, 839, 845, 846], "summary": {"covered_lines": 85, "num_statements": 92, "percent_covered": 92.3913043478261, "percent_covered_display": "92", "missing_lines": 7, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43, 49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/test_radios.py": {"executed_lines": [1, 4, 5, 7, 10, 12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"test_json_request": {"executed_lines": [12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 7, 10], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 4, 5, 7, 10, 12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}}, "totals": {"covered_lines": 550, "num_statements": 567, "percent_covered": 95.86776859504133, "percent_covered_display": "96", "missing_lines": 17, "excluded_lines": 0, "num_branches": 38, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 8}} \ No newline at end of file diff --git a/test-results/coverage-final/coverage_html_cb_6fb7b396.js b/test-results/coverage-final/coverage_html_cb_6fb7b396.js new file mode 100644 index 00000000..1face13d --- /dev/null +++ b/test-results/coverage-final/coverage_html_cb_6fb7b396.js @@ -0,0 +1,733 @@ +// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 +// For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt + +// Coverage.py HTML report browser code. +/*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 4 */ +/*global coverage: true, document, window, $ */ + +coverage = {}; + +// General helpers +function debounce(callback, wait) { + let timeoutId = null; + return function(...args) { + clearTimeout(timeoutId); + timeoutId = setTimeout(() => { + callback.apply(this, args); + }, wait); + }; +}; + +function checkVisible(element) { + const rect = element.getBoundingClientRect(); + const viewBottom = Math.max(document.documentElement.clientHeight, window.innerHeight); + const viewTop = 30; + return !(rect.bottom < viewTop || rect.top >= viewBottom); +} + +function on_click(sel, fn) { + const elt = document.querySelector(sel); + if (elt) { + elt.addEventListener("click", fn); + } +} + +// Helpers for table sorting +function getCellValue(row, column = 0) { + const cell = row.cells[column] // nosemgrep: eslint.detect-object-injection + if (cell.childElementCount == 1) { + var child = cell.firstElementChild; + if (child.tagName === "A") { + child = child.firstElementChild; + } + if (child instanceof HTMLDataElement && child.value) { + return child.value; + } + } + return cell.innerText || cell.textContent; +} + +function rowComparator(rowA, rowB, column = 0) { + let valueA = getCellValue(rowA, column); + let valueB = getCellValue(rowB, column); + if (!isNaN(valueA) && !isNaN(valueB)) { + return valueA - valueB; + } + return valueA.localeCompare(valueB, undefined, {numeric: true}); +} + +function sortColumn(th) { + // Get the current sorting direction of the selected header, + // clear state on other headers and then set the new sorting direction. + const currentSortOrder = th.getAttribute("aria-sort"); + [...th.parentElement.cells].forEach(header => header.setAttribute("aria-sort", "none")); + var direction; + if (currentSortOrder === "none") { + direction = th.dataset.defaultSortOrder || "ascending"; + } + else if (currentSortOrder === "ascending") { + direction = "descending"; + } + else { + direction = "ascending"; + } + th.setAttribute("aria-sort", direction); + + const column = [...th.parentElement.cells].indexOf(th) + + // Sort all rows and afterwards append them in order to move them in the DOM. + Array.from(th.closest("table").querySelectorAll("tbody tr")) + .sort((rowA, rowB) => rowComparator(rowA, rowB, column) * (direction === "ascending" ? 1 : -1)) + .forEach(tr => tr.parentElement.appendChild(tr)); + + // Save the sort order for next time. + if (th.id !== "region") { + let th_id = "file"; // Sort by file if we don't have a column id + let current_direction = direction; + const stored_list = localStorage.getItem(coverage.INDEX_SORT_STORAGE); + if (stored_list) { + ({th_id, direction} = JSON.parse(stored_list)) + } + localStorage.setItem(coverage.INDEX_SORT_STORAGE, JSON.stringify({ + "th_id": th.id, + "direction": current_direction + })); + if (th.id !== th_id || document.getElementById("region")) { + // Sort column has changed, unset sorting by function or class. + localStorage.setItem(coverage.SORTED_BY_REGION, JSON.stringify({ + "by_region": false, + "region_direction": current_direction + })); + } + } + else { + // Sort column has changed to by function or class, remember that. + localStorage.setItem(coverage.SORTED_BY_REGION, JSON.stringify({ + "by_region": true, + "region_direction": direction + })); + } +} + +// Find all the elements with data-shortcut attribute, and use them to assign a shortcut key. +coverage.assign_shortkeys = function () { + document.querySelectorAll("[data-shortcut]").forEach(element => { + document.addEventListener("keypress", event => { + if (event.target.tagName.toLowerCase() === "input") { + return; // ignore keypress from search filter + } + if (event.key === element.dataset.shortcut) { + element.click(); + } + }); + }); +}; + +// Create the events for the filter box. +coverage.wire_up_filter = function () { + // Populate the filter and hide100 inputs if there are saved values for them. + const saved_filter_value = localStorage.getItem(coverage.FILTER_STORAGE); + if (saved_filter_value) { + document.getElementById("filter").value = saved_filter_value; + } + const saved_hide100_value = localStorage.getItem(coverage.HIDE100_STORAGE); + if (saved_hide100_value) { + document.getElementById("hide100").checked = JSON.parse(saved_hide100_value); + } + + // Cache elements. + const table = document.querySelector("table.index"); + const table_body_rows = table.querySelectorAll("tbody tr"); + const no_rows = document.getElementById("no_rows"); + + // Observe filter keyevents. + const filter_handler = (event => { + // Keep running total of each metric, first index contains number of shown rows + const totals = new Array(table.rows[0].cells.length).fill(0); + // Accumulate the percentage as fraction + totals[totals.length - 1] = { "numer": 0, "denom": 0 }; // nosemgrep: eslint.detect-object-injection + + var text = document.getElementById("filter").value; + // Store filter value + localStorage.setItem(coverage.FILTER_STORAGE, text); + const casefold = (text === text.toLowerCase()); + const hide100 = document.getElementById("hide100").checked; + // Store hide value. + localStorage.setItem(coverage.HIDE100_STORAGE, JSON.stringify(hide100)); + + // Hide / show elements. + table_body_rows.forEach(row => { + var show = false; + // Check the text filter. + for (let column = 0; column < totals.length; column++) { + cell = row.cells[column]; + if (cell.classList.contains("name")) { + var celltext = cell.textContent; + if (casefold) { + celltext = celltext.toLowerCase(); + } + if (celltext.includes(text)) { + show = true; + } + } + } + + // Check the "hide covered" filter. + if (show && hide100) { + const [numer, denom] = row.cells[row.cells.length - 1].dataset.ratio.split(" "); + show = (numer !== denom); + } + + if (!show) { + // hide + row.classList.add("hidden"); + return; + } + + // show + row.classList.remove("hidden"); + totals[0]++; + + for (let column = 0; column < totals.length; column++) { + // Accumulate dynamic totals + cell = row.cells[column] // nosemgrep: eslint.detect-object-injection + if (cell.classList.contains("name")) { + continue; + } + if (column === totals.length - 1) { + // Last column contains percentage + const [numer, denom] = cell.dataset.ratio.split(" "); + totals[column]["numer"] += parseInt(numer, 10); // nosemgrep: eslint.detect-object-injection + totals[column]["denom"] += parseInt(denom, 10); // nosemgrep: eslint.detect-object-injection + } + else { + totals[column] += parseInt(cell.textContent, 10); // nosemgrep: eslint.detect-object-injection + } + } + }); + + // Show placeholder if no rows will be displayed. + if (!totals[0]) { + // Show placeholder, hide table. + no_rows.style.display = "block"; + table.style.display = "none"; + return; + } + + // Hide placeholder, show table. + no_rows.style.display = null; + table.style.display = null; + + const footer = table.tFoot.rows[0]; + // Calculate new dynamic sum values based on visible rows. + for (let column = 0; column < totals.length; column++) { + // Get footer cell element. + const cell = footer.cells[column]; // nosemgrep: eslint.detect-object-injection + if (cell.classList.contains("name")) { + continue; + } + + // Set value into dynamic footer cell element. + if (column === totals.length - 1) { + // Percentage column uses the numerator and denominator, + // and adapts to the number of decimal places. + const match = /\.([0-9]+)/.exec(cell.textContent); + const places = match ? match[1].length : 0; + const { numer, denom } = totals[column]; // nosemgrep: eslint.detect-object-injection + cell.dataset.ratio = `${numer} ${denom}`; + // Check denom to prevent NaN if filtered files contain no statements + cell.textContent = denom + ? `${(numer * 100 / denom).toFixed(places)}%` + : `${(100).toFixed(places)}%`; + } + else { + cell.textContent = totals[column]; // nosemgrep: eslint.detect-object-injection + } + } + }); + + document.getElementById("filter").addEventListener("input", debounce(filter_handler)); + document.getElementById("hide100").addEventListener("input", debounce(filter_handler)); + + // Trigger change event on setup, to force filter on page refresh + // (filter value may still be present). + document.getElementById("filter").dispatchEvent(new Event("input")); + document.getElementById("hide100").dispatchEvent(new Event("input")); +}; +coverage.FILTER_STORAGE = "COVERAGE_FILTER_VALUE"; +coverage.HIDE100_STORAGE = "COVERAGE_HIDE100_VALUE"; + +// Set up the click-to-sort columns. +coverage.wire_up_sorting = function () { + document.querySelectorAll("[data-sortable] th[aria-sort]").forEach( + th => th.addEventListener("click", e => sortColumn(e.target)) + ); + + // Look for a localStorage item containing previous sort settings: + let th_id = "file", direction = "ascending"; + const stored_list = localStorage.getItem(coverage.INDEX_SORT_STORAGE); + if (stored_list) { + ({th_id, direction} = JSON.parse(stored_list)); + } + let by_region = false, region_direction = "ascending"; + const sorted_by_region = localStorage.getItem(coverage.SORTED_BY_REGION); + if (sorted_by_region) { + ({ + by_region, + region_direction + } = JSON.parse(sorted_by_region)); + } + + const region_id = "region"; + if (by_region && document.getElementById(region_id)) { + direction = region_direction; + } + // If we are in a page that has a column with id of "region", sort on + // it if the last sort was by function or class. + let th; + if (document.getElementById(region_id)) { + th = document.getElementById(by_region ? region_id : th_id); + } + else { + th = document.getElementById(th_id); + } + th.setAttribute("aria-sort", direction === "ascending" ? "descending" : "ascending"); + th.click() +}; + +coverage.INDEX_SORT_STORAGE = "COVERAGE_INDEX_SORT_2"; +coverage.SORTED_BY_REGION = "COVERAGE_SORT_REGION"; + +// Loaded on index.html +coverage.index_ready = function () { + coverage.assign_shortkeys(); + coverage.wire_up_filter(); + coverage.wire_up_sorting(); + + on_click(".button_prev_file", coverage.to_prev_file); + on_click(".button_next_file", coverage.to_next_file); + + on_click(".button_show_hide_help", coverage.show_hide_help); +}; + +// -- pyfile stuff -- + +coverage.LINE_FILTERS_STORAGE = "COVERAGE_LINE_FILTERS"; + +coverage.pyfile_ready = function () { + // If we're directed to a particular line number, highlight the line. + var frag = location.hash; + if (frag.length > 2 && frag[1] === "t") { + document.querySelector(frag).closest(".n").classList.add("highlight"); + coverage.set_sel(parseInt(frag.substr(2), 10)); + } + else { + coverage.set_sel(0); + } + + on_click(".button_toggle_run", coverage.toggle_lines); + on_click(".button_toggle_mis", coverage.toggle_lines); + on_click(".button_toggle_exc", coverage.toggle_lines); + on_click(".button_toggle_par", coverage.toggle_lines); + + on_click(".button_next_chunk", coverage.to_next_chunk_nicely); + on_click(".button_prev_chunk", coverage.to_prev_chunk_nicely); + on_click(".button_top_of_page", coverage.to_top); + on_click(".button_first_chunk", coverage.to_first_chunk); + + on_click(".button_prev_file", coverage.to_prev_file); + on_click(".button_next_file", coverage.to_next_file); + on_click(".button_to_index", coverage.to_index); + + on_click(".button_show_hide_help", coverage.show_hide_help); + + coverage.filters = undefined; + try { + coverage.filters = localStorage.getItem(coverage.LINE_FILTERS_STORAGE); + } catch(err) {} + + if (coverage.filters) { + coverage.filters = JSON.parse(coverage.filters); + } + else { + coverage.filters = {run: false, exc: true, mis: true, par: true}; + } + + for (cls in coverage.filters) { + coverage.set_line_visibilty(cls, coverage.filters[cls]); // nosemgrep: eslint.detect-object-injection + } + + coverage.assign_shortkeys(); + coverage.init_scroll_markers(); + coverage.wire_up_sticky_header(); + + document.querySelectorAll("[id^=ctxs]").forEach( + cbox => cbox.addEventListener("click", coverage.expand_contexts) + ); + + // Rebuild scroll markers when the window height changes. + window.addEventListener("resize", coverage.build_scroll_markers); +}; + +coverage.toggle_lines = function (event) { + const btn = event.target.closest("button"); + const category = btn.value + const show = !btn.classList.contains("show_" + category); + coverage.set_line_visibilty(category, show); + coverage.build_scroll_markers(); + coverage.filters[category] = show; + try { + localStorage.setItem(coverage.LINE_FILTERS_STORAGE, JSON.stringify(coverage.filters)); + } catch(err) {} +}; + +coverage.set_line_visibilty = function (category, should_show) { + const cls = "show_" + category; + const btn = document.querySelector(".button_toggle_" + category); + if (btn) { + if (should_show) { + document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls)); + btn.classList.add(cls); + } + else { + document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls)); + btn.classList.remove(cls); + } + } +}; + +// Return the nth line div. +coverage.line_elt = function (n) { + return document.getElementById("t" + n)?.closest("p"); +}; + +// Set the selection. b and e are line numbers. +coverage.set_sel = function (b, e) { + // The first line selected. + coverage.sel_begin = b; + // The next line not selected. + coverage.sel_end = (e === undefined) ? b+1 : e; +}; + +coverage.to_top = function () { + coverage.set_sel(0, 1); + coverage.scroll_window(0); +}; + +coverage.to_first_chunk = function () { + coverage.set_sel(0, 1); + coverage.to_next_chunk(); +}; + +coverage.to_prev_file = function () { + window.location = document.getElementById("prevFileLink").href; +} + +coverage.to_next_file = function () { + window.location = document.getElementById("nextFileLink").href; +} + +coverage.to_index = function () { + location.href = document.getElementById("indexLink").href; +} + +coverage.show_hide_help = function () { + const helpCheck = document.getElementById("help_panel_state") + helpCheck.checked = !helpCheck.checked; +} + +// Return a string indicating what kind of chunk this line belongs to, +// or null if not a chunk. +coverage.chunk_indicator = function (line_elt) { + const classes = line_elt?.className; + if (!classes) { + return null; + } + const match = classes.match(/\bshow_\w+\b/); + if (!match) { + return null; + } + return match[0]; +}; + +coverage.to_next_chunk = function () { + const c = coverage; + + // Find the start of the next colored chunk. + var probe = c.sel_end; + var chunk_indicator, probe_line; + while (true) { + probe_line = c.line_elt(probe); + if (!probe_line) { + return; + } + chunk_indicator = c.chunk_indicator(probe_line); + if (chunk_indicator) { + break; + } + probe++; + } + + // There's a next chunk, `probe` points to it. + var begin = probe; + + // Find the end of this chunk. + var next_indicator = chunk_indicator; + while (next_indicator === chunk_indicator) { + probe++; + probe_line = c.line_elt(probe); + next_indicator = c.chunk_indicator(probe_line); + } + c.set_sel(begin, probe); + c.show_selection(); +}; + +coverage.to_prev_chunk = function () { + const c = coverage; + + // Find the end of the prev colored chunk. + var probe = c.sel_begin-1; + var probe_line = c.line_elt(probe); + if (!probe_line) { + return; + } + var chunk_indicator = c.chunk_indicator(probe_line); + while (probe > 1 && !chunk_indicator) { + probe--; + probe_line = c.line_elt(probe); + if (!probe_line) { + return; + } + chunk_indicator = c.chunk_indicator(probe_line); + } + + // There's a prev chunk, `probe` points to its last line. + var end = probe+1; + + // Find the beginning of this chunk. + var prev_indicator = chunk_indicator; + while (prev_indicator === chunk_indicator) { + probe--; + if (probe <= 0) { + return; + } + probe_line = c.line_elt(probe); + prev_indicator = c.chunk_indicator(probe_line); + } + c.set_sel(probe+1, end); + c.show_selection(); +}; + +// Returns 0, 1, or 2: how many of the two ends of the selection are on +// the screen right now? +coverage.selection_ends_on_screen = function () { + if (coverage.sel_begin === 0) { + return 0; + } + + const begin = coverage.line_elt(coverage.sel_begin); + const end = coverage.line_elt(coverage.sel_end-1); + + return ( + (checkVisible(begin) ? 1 : 0) + + (checkVisible(end) ? 1 : 0) + ); +}; + +coverage.to_next_chunk_nicely = function () { + if (coverage.selection_ends_on_screen() === 0) { + // The selection is entirely off the screen: + // Set the top line on the screen as selection. + + // This will select the top-left of the viewport + // As this is most likely the span with the line number we take the parent + const line = document.elementFromPoint(0, 0).parentElement; + if (line.parentElement !== document.getElementById("source")) { + // The element is not a source line but the header or similar + coverage.select_line_or_chunk(1); + } + else { + // We extract the line number from the id + coverage.select_line_or_chunk(parseInt(line.id.substring(1), 10)); + } + } + coverage.to_next_chunk(); +}; + +coverage.to_prev_chunk_nicely = function () { + if (coverage.selection_ends_on_screen() === 0) { + // The selection is entirely off the screen: + // Set the lowest line on the screen as selection. + + // This will select the bottom-left of the viewport + // As this is most likely the span with the line number we take the parent + const line = document.elementFromPoint(document.documentElement.clientHeight-1, 0).parentElement; + if (line.parentElement !== document.getElementById("source")) { + // The element is not a source line but the header or similar + coverage.select_line_or_chunk(coverage.lines_len); + } + else { + // We extract the line number from the id + coverage.select_line_or_chunk(parseInt(line.id.substring(1), 10)); + } + } + coverage.to_prev_chunk(); +}; + +// Select line number lineno, or if it is in a colored chunk, select the +// entire chunk +coverage.select_line_or_chunk = function (lineno) { + var c = coverage; + var probe_line = c.line_elt(lineno); + if (!probe_line) { + return; + } + var the_indicator = c.chunk_indicator(probe_line); + if (the_indicator) { + // The line is in a highlighted chunk. + // Search backward for the first line. + var probe = lineno; + var indicator = the_indicator; + while (probe > 0 && indicator === the_indicator) { + probe--; + probe_line = c.line_elt(probe); + if (!probe_line) { + break; + } + indicator = c.chunk_indicator(probe_line); + } + var begin = probe + 1; + + // Search forward for the last line. + probe = lineno; + indicator = the_indicator; + while (indicator === the_indicator) { + probe++; + probe_line = c.line_elt(probe); + indicator = c.chunk_indicator(probe_line); + } + + coverage.set_sel(begin, probe); + } + else { + coverage.set_sel(lineno); + } +}; + +coverage.show_selection = function () { + // Highlight the lines in the chunk + document.querySelectorAll("#source .highlight").forEach(e => e.classList.remove("highlight")); + for (let probe = coverage.sel_begin; probe < coverage.sel_end; probe++) { + coverage.line_elt(probe).querySelector(".n").classList.add("highlight"); + } + + coverage.scroll_to_selection(); +}; + +coverage.scroll_to_selection = function () { + // Scroll the page if the chunk isn't fully visible. + if (coverage.selection_ends_on_screen() < 2) { + const element = coverage.line_elt(coverage.sel_begin); + coverage.scroll_window(element.offsetTop - 60); + } +}; + +coverage.scroll_window = function (to_pos) { + window.scroll({top: to_pos, behavior: "smooth"}); +}; + +coverage.init_scroll_markers = function () { + // Init some variables + coverage.lines_len = document.querySelectorAll("#source > p").length; + + // Build html + coverage.build_scroll_markers(); +}; + +coverage.build_scroll_markers = function () { + const temp_scroll_marker = document.getElementById("scroll_marker") + if (temp_scroll_marker) temp_scroll_marker.remove(); + // Don't build markers if the window has no scroll bar. + if (document.body.scrollHeight <= window.innerHeight) { + return; + } + + const marker_scale = window.innerHeight / document.body.scrollHeight; + const line_height = Math.min(Math.max(3, window.innerHeight / coverage.lines_len), 10); + + let previous_line = -99, last_mark, last_top; + + const scroll_marker = document.createElement("div"); + scroll_marker.id = "scroll_marker"; + document.getElementById("source").querySelectorAll( + "p.show_run, p.show_mis, p.show_exc, p.show_exc, p.show_par" + ).forEach(element => { + const line_top = Math.floor(element.offsetTop * marker_scale); + const line_number = parseInt(element.querySelector(".n a").id.substr(1)); + + if (line_number === previous_line + 1) { + // If this solid missed block just make previous mark higher. + last_mark.style.height = `${line_top + line_height - last_top}px`; + } + else { + // Add colored line in scroll_marker block. + last_mark = document.createElement("div"); + last_mark.id = `m${line_number}`; + last_mark.classList.add("marker"); + last_mark.style.height = `${line_height}px`; + last_mark.style.top = `${line_top}px`; + scroll_marker.append(last_mark); + last_top = line_top; + } + + previous_line = line_number; + }); + + // Append last to prevent layout calculation + document.body.append(scroll_marker); +}; + +coverage.wire_up_sticky_header = function () { + const header = document.querySelector("header"); + const header_bottom = ( + header.querySelector(".content h2").getBoundingClientRect().top - + header.getBoundingClientRect().top + ); + + function updateHeader() { + if (window.scrollY > header_bottom) { + header.classList.add("sticky"); + } + else { + header.classList.remove("sticky"); + } + } + + window.addEventListener("scroll", updateHeader); + updateHeader(); +}; + +coverage.expand_contexts = function (e) { + var ctxs = e.target.parentNode.querySelector(".ctxs"); + + if (!ctxs.classList.contains("expanded")) { + var ctxs_text = ctxs.textContent; + var width = Number(ctxs_text[0]); + ctxs.textContent = ""; + for (var i = 1; i < ctxs_text.length; i += width) { + key = ctxs_text.substring(i, i + width).trim(); + ctxs.appendChild(document.createTextNode(contexts[key])); + ctxs.appendChild(document.createElement("br")); + } + ctxs.classList.add("expanded"); + } +}; + +document.addEventListener("DOMContentLoaded", () => { + if (document.body.classList.contains("indexfile")) { + coverage.index_ready(); + } + else { + coverage.pyfile_ready(); + } +}); diff --git a/test-results/coverage-final/favicon_32_cb_58284776.png b/test-results/coverage-final/favicon_32_cb_58284776.png new file mode 100644 index 0000000000000000000000000000000000000000..3516789c0c2caef030c1f67b7abacfb3cb3126b4 GIT binary patch literal 1730 zcmV;z20i(SP)+ +
++ + + +File +class +statements +missing +excluded +branches +partial +coverage ++ +src/radios/models.py +CommaSeparatedString +2 +1 +0 +0 +0 +50% ++ +src/radios/models.py +Station +3 +3 +0 +2 +0 +0% ++ +src/radios/models.py +Country +1 +1 +0 +0 +0 +0% ++ +src/radios/models.py +Language +3 +3 +0 +2 +0 +0% ++ + + +src/radios/radio_browser.py +RadioBrowser +75 +0 +0 +34 +4 +96% ++ + +Total ++ 195 +8 +0 +38 +4 +93% ++ No items found using the specified filter. +
+4 classes skipped due to complete coverage.
+9D>00RI}OjJbx00000 z00000GBq$$Qd2uYHXIxp6%!Nz000310RR9100000005kwo*W7s9vK}P9RvXa5D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nP2`6LR7cLHgNrRa=7om5nrdtA?GO;;?`Joy) vjng!Grr%H1%FtPb|PIs^~b16Rk@)FPm)BFPc<73Uu z&GP~aXQZ&HGcYi+OpiA=Gcz-HIs7c->LOQLyFCA(fQgQY0YUMSjG+7gm|&`{83>p= zUaNm{1jI0NaSb?G<6sxa&ICzv`Q{K6Q!`!{LYZccJ}!RDs*ps oR zx3hBy_IEV*o)jp_4zVARw;9=VgB{|$?OaN0f;Cv#5SbUDgo}fpRlKQ5Tv~~POC2r@ Y059?-JLr>-3IG5A07*qoM6N<$g7d!_7ytkO literal 0 HcmV?d00001 diff --git a/test-results/coverage-final/function_index.html b/test-results/coverage-final/function_index.html new file mode 100644 index 00000000..5c5b2e1e --- /dev/null +++ b/test-results/coverage-final/function_index.html @@ -0,0 +1,194 @@ + + + + + Coverage report + + + + + ++ +++Coverage report: + 93% +
+ + ++ Files + Functions + Classes +
++ coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
++ + + + diff --git a/test-results/coverage-final/index.html b/test-results/coverage-final/index.html new file mode 100644 index 00000000..f35324cd --- /dev/null +++ b/test-results/coverage-final/index.html @@ -0,0 +1,129 @@ + + + + ++ +
++ + + +File +function +statements +missing +excluded +branches +partial +coverage ++ +src/radios/models.py +CommaSeparatedString.serialize +1 +1 +0 +0 +0 +0% ++ +src/radios/models.py +Station.country +3 +3 +0 +2 +0 +0% ++ +src/radios/models.py +Country.favicon +1 +1 +0 +0 +0 +0% ++ +src/radios/models.py +Language.favicon +3 +3 +0 +2 +0 +0% ++ +src/radios/radio_browser.py +RadioBrowser._request +29 +0 +0 +12 +1 +98% ++ +src/radios/radio_browser.py +RadioBrowser.countries +11 +0 +0 +8 +1 +95% ++ +src/radios/radio_browser.py +RadioBrowser.search +8 +0 +0 +4 +1 +92% ++ + + +src/radios/radio_browser.py +RadioBrowser.stations +8 +0 +0 +4 +1 +92% ++ + +Total ++ 195 +8 +0 +38 +4 +93% ++ No items found using the specified filter. +
+11 functions skipped due to complete coverage.
+Coverage report + + + + + ++ +++Coverage report: + 94% +
+ + ++ Files + Functions + Classes +
++ coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
++ + + + diff --git a/test-results/coverage-final/keybd_closed_cb_ce680311.png b/test-results/coverage-final/keybd_closed_cb_ce680311.png new file mode 100644 index 0000000000000000000000000000000000000000..9c5dc188f8fe076cf0ee3573f4d8d3fb6ea04f85 GIT binary patch literal 9003 zcmeHLc{tSF+aIY=A^R4_poB4tZAN2XC;O7M(inrW3}(h&Q4}dl*&-65$i9^&vW6_# zcM4g`Qix=GhkBl;=lwnJ@Ap2}^}hc-b6vBXb3XUyzR%~}_c`-Dw+!?&k8mFW008u8 zEj1&`Hyh=BjP@Yq^VDkvJph2|hOdb^*$CqWbR)Xj;hk|nvX2`Mi1WtV0RY}Z3kepU zJZB2kcVVI2DycL#13hyRYIv?L&+ +
++ + + +File +statements +missing +excluded +branches +partial +coverage ++ +src/radios/models.py +84 +8 +0 +4 +0 +86% ++ + + +src/radios/radio_browser.py +111 +0 +0 +34 +4 +97% ++ + +Total +240 +8 +0 +38 +4 +94% ++ No items found using the specified filter. +
+3 files skipped due to complete coverage.
+5<7eM(VPa=?2gSYU$cX`ADyspqDfb_7-MY!qwI))-&5xyDw6jy1eN= z49@HO+gHj8u6WPHKHr(>_3=9PdD$t<^)hXx< 9KpxBwXoQ8-S-=q$Uw$t>}T?^~f z%_i4us=0+mm6e^cdfBJ$#Smz55cGXYG9|N$NsLNn`Bbn9L&+>Q1eS3hdrP`>%2*4Q z9vu~6{YD}91gQlXcb+6x6~wG9TE=SZi0?heh-gf3%uVkb;*OHhAdHN@cvP}jzLfI% zq3>dP|JdO<$=VRXFjOd)NAX-n^1FH+$qx7@=Qk2Y_#13ymOe4(%!bp3*3Qho=x(o= zFCVt*$wp$fS65~Xiz1#P!=lgMA5U$}K`P$NKXA&>Mx*|Gz8XsVpq9faSVbs(4HsQf z{hjQ`qN#N)A~o@*AdQ1{g%X5K_6qB}exVQO-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gMdGs zQ(T{kkGOf`Zo5fl^D;9x&BR)9tN1hX>V@_2dPW=Bvt3$SLSy0gnhHl3gum2pc@GVX zGj`u54V$^V@BF~ZA4kQ~SRY-SmMQnTcrea)Drm&`QW{M4YevH9GA1_SGJ^H1dbzId zm|e__7!DXwQ0ZLDdkf{lx8`5nuh5>=*4QY1bS2-hEicAxf;_@!}006-F2v51eGS}6S!@9aiU~FA&a1!1wZj>7?005=v?S{cR z;mAN6oIRc(4_d0I1_AN5@*p#5U8t^`D$W6~ v~UN-~;+=q~zY8<0l2BB@c2SlilPX5HBw;2`@ R}Zp02t*kN{v@Z2V%5DVoj)DywfE^sWLpTD(vYIehXR1W zp-==E3J1fHkYDX7qq@4kTN6k>Rix+%@y578U=mP>i_4!ZNMv=-Km7fr1<8bRkq9xu zkz759Se&{ijzAXt)v24a2kBRz9wgje*M8j2wssIoQ2U;Lwb4ZD8vJgvC!;;y#ckhW z5B)3B7W+HS&4cK?kFmu IYq0 =pQ`>&KR I4<^^N}+F~PgwjLDci)nGC(grp2o3Wk)H zl$1pLVs45fk| Vz~TGmwpck03MGb;ZFm=qJr3eVu-_lpTNgRXY$(c7E(G?> zVEg@)$;hb^aTu~I(Zto&Sst_(EO3u g-CqKVjz5O54j6(x zj ?Bt^ zvKNMkQ?{q%0A-yiwY9&_K#?Emclyu4csbzqa*IL-hDw29k|uCTIjE$ZB&FJ< lGEY@$y^FQEzvHzK<|H=GU z*bi$}S2rI@B|DJyy$Ju-{a*loFzDd1I0DJ_--Z4w TQXa?;*l2620d|8UTB|87IyWr~5&&?NW$#S|NJ!+QbkdN~y6Q9^ z4l+ body { font-size: 16px; } + +a:active, a:focus { outline: 2px dashed #007acc; } + +p { font-size: .875em; line-height: 1.4em; } + +table { border-collapse: collapse; } + +td { vertical-align: top; } + +table tr.hidden { display: none !important; } + +p#no_rows { display: none; font-size: 1.15em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } + +a.nav { text-decoration: none; color: inherit; } + +a.nav:hover { text-decoration: underline; color: inherit; } + +.hidden { display: none; } + +header { background: #f8f8f8; width: 100%; z-index: 2; border-bottom: 1px solid #ccc; } + +@media (prefers-color-scheme: dark) { header { background: black; } } + +@media (prefers-color-scheme: dark) { header { border-color: #333; } } + +header .content { padding: 1rem 3.5rem; } + +header h2 { margin-top: .5em; font-size: 1em; } + +header h2 a.button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; background: #eee; color: inherit; text-decoration: none; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; } + +@media (prefers-color-scheme: dark) { header h2 a.button { background: #333; } } + +@media (prefers-color-scheme: dark) { header h2 a.button { border-color: #444; } } + +header h2 a.button.current { border: 2px solid; background: #fff; border-color: #999; cursor: default; } + +@media (prefers-color-scheme: dark) { header h2 a.button.current { background: #1e1e1e; } } + +@media (prefers-color-scheme: dark) { header h2 a.button.current { border-color: #777; } } + +header p.text { margin: .5em 0 -.5em; color: #666; font-style: italic; } + +@media (prefers-color-scheme: dark) { header p.text { color: #aaa; } } + +header.sticky { position: fixed; left: 0; right: 0; height: 2.5em; } + +header.sticky .text { display: none; } + +header.sticky h1, header.sticky h2 { font-size: 1em; margin-top: 0; display: inline-block; } + +header.sticky .content { padding: 0.5rem 3.5rem; } + +header.sticky .content p { font-size: 1em; } + +header.sticky ~ #source { padding-top: 6.5em; } + +main { position: relative; z-index: 1; } + +footer { margin: 1rem 3.5rem; } + +footer .content { padding: 0; color: #666; font-style: italic; } + +@media (prefers-color-scheme: dark) { footer .content { color: #aaa; } } + +#index { margin: 1rem 0 0 3.5rem; } + +h1 { font-size: 1.25em; display: inline-block; } + +#filter_container { float: right; margin: 0 2em 0 0; line-height: 1.66em; } + +#filter_container #filter { width: 10em; padding: 0.2em 0.5em; border: 2px solid #ccc; background: #fff; color: #000; } + +@media (prefers-color-scheme: dark) { #filter_container #filter { border-color: #444; } } + +@media (prefers-color-scheme: dark) { #filter_container #filter { background: #1e1e1e; } } + +@media (prefers-color-scheme: dark) { #filter_container #filter { color: #eee; } } + +#filter_container #filter:focus { border-color: #007acc; } + +#filter_container :disabled ~ label { color: #ccc; } + +@media (prefers-color-scheme: dark) { #filter_container :disabled ~ label { color: #444; } } + +#filter_container label { font-size: .875em; color: #666; } + +@media (prefers-color-scheme: dark) { #filter_container label { color: #aaa; } } + +header button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; background: #eee; color: inherit; text-decoration: none; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; } + +@media (prefers-color-scheme: dark) { header button { background: #333; } } + +@media (prefers-color-scheme: dark) { header button { border-color: #444; } } + +header button:active, header button:focus { outline: 2px dashed #007acc; } + +header button.run { background: #eeffee; } + +@media (prefers-color-scheme: dark) { header button.run { background: #373d29; } } + +header button.run.show_run { background: #dfd; border: 2px solid #00dd00; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.run.show_run { background: #373d29; } } + +header button.mis { background: #ffeeee; } + +@media (prefers-color-scheme: dark) { header button.mis { background: #4b1818; } } + +header button.mis.show_mis { background: #fdd; border: 2px solid #ff0000; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.mis.show_mis { background: #4b1818; } } + +header button.exc { background: #f7f7f7; } + +@media (prefers-color-scheme: dark) { header button.exc { background: #333; } } + +header button.exc.show_exc { background: #eee; border: 2px solid #808080; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.exc.show_exc { background: #333; } } + +header button.par { background: #ffffd5; } + +@media (prefers-color-scheme: dark) { header button.par { background: #650; } } + +header button.par.show_par { background: #ffa; border: 2px solid #bbbb00; margin: 0 .1em; } + +@media (prefers-color-scheme: dark) { header button.par.show_par { background: #650; } } + +#help_panel, #source p .annotate.long { display: none; position: absolute; z-index: 999; background: #ffffcc; border: 1px solid #888; border-radius: .2em; color: #333; padding: .25em .5em; } + +#source p .annotate.long { white-space: normal; float: right; top: 1.75em; right: 1em; height: auto; } + +#help_panel_wrapper { float: right; position: relative; } + +#keyboard_icon { margin: 5px; } + +#help_panel_state { display: none; } + +#help_panel { top: 25px; right: 0; padding: .75em; border: 1px solid #883; color: #333; } + +#help_panel .keyhelp p { margin-top: .75em; } + +#help_panel .legend { font-style: italic; margin-bottom: 1em; } + +.indexfile #help_panel { width: 25em; } + +.pyfile #help_panel { width: 18em; } + +#help_panel_state:checked ~ #help_panel { display: block; } + +kbd { border: 1px solid black; border-color: #888 #333 #333 #888; padding: .1em .35em; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: bold; background: #eee; border-radius: 3px; } + +#source { padding: 1em 0 1em 3.5rem; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; } + +#source p { position: relative; white-space: pre; } + +#source p * { box-sizing: border-box; } + +#source p .n { float: left; text-align: right; width: 3.5rem; box-sizing: border-box; margin-left: -3.5rem; padding-right: 1em; color: #999; user-select: none; } + +@media (prefers-color-scheme: dark) { #source p .n { color: #777; } } + +#source p .n.highlight { background: #ffdd00; } + +#source p .n a { scroll-margin-top: 6em; text-decoration: none; color: #999; } + +@media (prefers-color-scheme: dark) { #source p .n a { color: #777; } } + +#source p .n a:hover { text-decoration: underline; color: #999; } + +@media (prefers-color-scheme: dark) { #source p .n a:hover { color: #777; } } + +#source p .t { display: inline-block; width: 100%; box-sizing: border-box; margin-left: -.5em; padding-left: 0.3em; border-left: 0.2em solid #fff; } + +@media (prefers-color-scheme: dark) { #source p .t { border-color: #1e1e1e; } } + +#source p .t:hover { background: #f2f2f2; } + +@media (prefers-color-scheme: dark) { #source p .t:hover { background: #282828; } } + +#source p .t:hover ~ .r .annotate.long { display: block; } + +#source p .t .com { color: #008000; font-style: italic; line-height: 1px; } + +@media (prefers-color-scheme: dark) { #source p .t .com { color: #6a9955; } } + +#source p .t .key { font-weight: bold; line-height: 1px; } + +#source p .t .str { color: #0451a5; } + +@media (prefers-color-scheme: dark) { #source p .t .str { color: #9cdcfe; } } + +#source p.mis .t { border-left: 0.2em solid #ff0000; } + +#source p.mis.show_mis .t { background: #fdd; } + +@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t { background: #4b1818; } } + +#source p.mis.show_mis .t:hover { background: #f2d2d2; } + +@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t:hover { background: #532323; } } + +#source p.run .t { border-left: 0.2em solid #00dd00; } + +#source p.run.show_run .t { background: #dfd; } + +@media (prefers-color-scheme: dark) { #source p.run.show_run .t { background: #373d29; } } + +#source p.run.show_run .t:hover { background: #d2f2d2; } + +@media (prefers-color-scheme: dark) { #source p.run.show_run .t:hover { background: #404633; } } + +#source p.exc .t { border-left: 0.2em solid #808080; } + +#source p.exc.show_exc .t { background: #eee; } + +@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t { background: #333; } } + +#source p.exc.show_exc .t:hover { background: #e2e2e2; } + +@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t:hover { background: #3c3c3c; } } + +#source p.par .t { border-left: 0.2em solid #bbbb00; } + +#source p.par.show_par .t { background: #ffa; } + +@media (prefers-color-scheme: dark) { #source p.par.show_par .t { background: #650; } } + +#source p.par.show_par .t:hover { background: #f2f2a2; } + +@media (prefers-color-scheme: dark) { #source p.par.show_par .t:hover { background: #6d5d0c; } } + +#source p .r { position: absolute; top: 0; right: 2.5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } + +#source p .annotate { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; color: #666; padding-right: .5em; } + +@media (prefers-color-scheme: dark) { #source p .annotate { color: #ddd; } } + +#source p .annotate.short:hover ~ .long { display: block; } + +#source p .annotate.long { width: 30em; right: 2.5em; } + +#source p input { display: none; } + +#source p input ~ .r label.ctx { cursor: pointer; border-radius: .25em; } + +#source p input ~ .r label.ctx::before { content: "▶ "; } + +#source p input ~ .r label.ctx:hover { background: #e8f4ff; color: #666; } + +@media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { background: #0f3a42; } } + +@media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { color: #aaa; } } + +#source p input:checked ~ .r label.ctx { background: #d0e8ff; color: #666; border-radius: .75em .75em 0 0; padding: 0 .5em; margin: -.25em 0; } + +@media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { background: #056; } } + +@media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { color: #aaa; } } + +#source p input:checked ~ .r label.ctx::before { content: "▼ "; } + +#source p input:checked ~ .ctxs { padding: .25em .5em; overflow-y: scroll; max-height: 10.5em; } + +#source p label.ctx { color: #999; display: inline-block; padding: 0 .5em; font-size: .8333em; } + +@media (prefers-color-scheme: dark) { #source p label.ctx { color: #777; } } + +#source p .ctxs { display: block; max-height: 0; overflow-y: hidden; transition: all .2s; padding: 0 .5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; white-space: nowrap; background: #d0e8ff; border-radius: .25em; margin-right: 1.75em; text-align: right; } + +@media (prefers-color-scheme: dark) { #source p .ctxs { background: #056; } } + +#index { font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875em; } + +#index table.index { margin-left: -.5em; } + +#index td, #index th { text-align: right; padding: .25em .5em; border-bottom: 1px solid #eee; } + +@media (prefers-color-scheme: dark) { #index td, #index th { border-color: #333; } } + +#index td.name, #index th.name { text-align: left; width: auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; min-width: 15em; } + +#index th { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-style: italic; color: #333; cursor: pointer; } + +@media (prefers-color-scheme: dark) { #index th { color: #ddd; } } + +#index th:hover { background: #eee; } + +@media (prefers-color-scheme: dark) { #index th:hover { background: #333; } } + +#index th .arrows { color: #666; font-size: 85%; font-family: sans-serif; font-style: normal; pointer-events: none; } + +#index th[aria-sort="ascending"], #index th[aria-sort="descending"] { white-space: nowrap; background: #eee; padding-left: .5em; } + +@media (prefers-color-scheme: dark) { #index th[aria-sort="ascending"], #index th[aria-sort="descending"] { background: #333; } } + +#index th[aria-sort="ascending"] .arrows::after { content: " ▲"; } + +#index th[aria-sort="descending"] .arrows::after { content: " ▼"; } + +#index td.name { font-size: 1.15em; } + +#index td.name a { text-decoration: none; color: inherit; } + +#index td.name .no-noun { font-style: italic; } + +#index tr.total td, #index tr.total_dynamic td { font-weight: bold; border-top: 1px solid #ccc; border-bottom: none; } + +#index tr.region:hover { background: #eee; } + +@media (prefers-color-scheme: dark) { #index tr.region:hover { background: #333; } } + +#index tr.region:hover td.name { text-decoration: underline; color: inherit; } + +#scroll_marker { position: fixed; z-index: 3; right: 0; top: 0; width: 16px; height: 100%; background: #fff; border-left: 1px solid #eee; will-change: transform; } + +@media (prefers-color-scheme: dark) { #scroll_marker { background: #1e1e1e; } } + +@media (prefers-color-scheme: dark) { #scroll_marker { border-color: #333; } } + +#scroll_marker .marker { background: #ccc; position: absolute; min-height: 3px; width: 100%; } + +@media (prefers-color-scheme: dark) { #scroll_marker .marker { background: #444; } } diff --git a/test-results/coverage-final/z_a44f0ac069e85531___init___py.html b/test-results/coverage-final/z_a44f0ac069e85531___init___py.html new file mode 100644 index 00000000..df11f198 --- /dev/null +++ b/test-results/coverage-final/z_a44f0ac069e85531___init___py.html @@ -0,0 +1,108 @@ + + + + + Coverage for tests/__init__.py: 50% + + + + + ++ ++++ Coverage for tests/__init__.py: + 50% +
+ ++ 4 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:50 +0000 +
+ ++ + + + diff --git a/test-results/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html b/test-results/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html new file mode 100644 index 00000000..b486d8ac --- /dev/null +++ b/test-results/coverage-final/z_a44f0ac069e85531_test_radio_browser_py.html @@ -0,0 +1,951 @@ + + + + +1"""Asynchronous Python client for the Radio Browser API."""
+ +3from pathlib import Path
+ + +6def load_fixture(filename: str) -> str:
+7 """Load a fixture."""
+8 path = Path(__package__) / "fixtures" / filename
+9 return path.read_text(encoding="utf-8")
+Coverage for tests/test_radio_browser.py: 98% + + + + + ++ ++++ Coverage for tests/test_radio_browser.py: + 98% +
+ ++ 313 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:50 +0000 +
+ ++ + + + diff --git a/test-results/coverage-final/z_c8b1f7e3f131828c_models_py.html b/test-results/coverage-final/z_c8b1f7e3f131828c_models_py.html new file mode 100644 index 00000000..a7fc91a6 --- /dev/null +++ b/test-results/coverage-final/z_c8b1f7e3f131828c_models_py.html @@ -0,0 +1,259 @@ + + + + +1import asyncio
+2import socket
+3from datetime import datetime
+4from unittest.mock import AsyncMock, MagicMock, patch
+ +6import aiohttp
+7import orjson
+8import pytest
+9from aiodns import DNSResolver
+10from awesomeversion import AwesomeVersion
+ +12from radios.const import FilterBy, Order
+13from radios.exceptions import (
+14 RadioBrowserConnectionError,
+15 RadioBrowserConnectionTimeoutError,
+16 RadioBrowserError,
+17)
+18from radios.models import Country, Language, Station, Stats, Tag
+19from radios.radio_browser import RadioBrowser
+ + +22@pytest.fixture
+23def radio_browser():
+24 """Return a RadioBrowser instance."""
+25 return RadioBrowser(user_agent="Test/1.0")
+ + +28@pytest.fixture
+29def mock_dns_resolver():
+30 """Return a mocked DNS resolver."""
+31 resolver = MagicMock(spec=DNSResolver)
+32 result = MagicMock()
+33 result.host = "api.radio-browser.info"
+34 resolver.query.return_value = asyncio.Future()
+35 resolver.query.return_value.set_result([result])
+36 return resolver
+ + +39@pytest.fixture
+40def mock_session():
+41 """Return a mocked aiohttp ClientSession."""
+42 session = AsyncMock(spec=aiohttp.ClientSession)
+43 return session
+ + +46@pytest.fixture
+47def mock_response():
+48 """Return a mocked aiohttp ClientResponse."""
+49 response = AsyncMock()
+50 response.status = 200
+51 response.headers = {"Content-Type": "application/json"}
+52 response.text = AsyncMock(return_value='{"key": "value"}')
+53 return response
+ + +56class TestRadioBrowser:
+57 """Tests for the RadioBrowser class."""
+ +59 @pytest.mark.asyncio
+60 async def test_request_dns_resolution(self, radio_browser, mock_dns_resolver):
+61 """Test that the _request method resolves DNS."""
+62 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+63 with patch.object(radio_browser, "session", AsyncMock()) as mock_session:
+64 mock_response = AsyncMock()
+65 mock_response.headers = {"Content-Type": "application/json"}
+66 mock_response.text.return_value = "{}"
+67 mock_session.request.return_value = mock_response
+ +69 await radio_browser._request("test")
+ +71 mock_dns_resolver.query.assert_called_once_with(
+72 "_api._tcp.radio-browser.info", "SRV"
+73 )
+74 assert radio_browser._host == "api.radio-browser.info"
+ +76 @pytest.mark.asyncio
+77 async def test_request_creates_session_if_none(self, radio_browser, mock_dns_resolver):
+78 """Test that _request creates a session if none exists."""
+79 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+80 with patch("radios.radio_browser.aiohttp.ClientSession") as mock_client_session:
+81 mock_session = AsyncMock()
+82 mock_response = AsyncMock()
+83 mock_response.headers = {"Content-Type": "application/json"}
+84 mock_response.text.return_value = "{}"
+85 mock_session.request.return_value = mock_response
+86 mock_client_session.return_value = mock_session
+ +88 assert radio_browser.session is None
+89 await radio_browser._request("test")
+90 assert radio_browser.session is not None
+91 assert radio_browser._close_session is True
+ +93 @pytest.mark.asyncio
+94 async def test_request_uses_existing_session(self, radio_browser, mock_dns_resolver):
+95 """Test that _request uses an existing session if available."""
+96 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+97 mock_session = AsyncMock()
+98 mock_response = AsyncMock()
+99 mock_response.headers = {"Content-Type": "application/json"}
+100 mock_response.text.return_value = "{}"
+101 mock_session.request.return_value = mock_response
+102 radio_browser.session = mock_session
+103 radio_browser._close_session = False
+ +105 await radio_browser._request("test")
+ +107 mock_session.request.assert_called_once()
+108 assert radio_browser._close_session is False
+ +110 @pytest.mark.asyncio
+111 async def test_request_timeout(self, radio_browser, mock_dns_resolver):
+112 """Test that _request raises RadioBrowserConnectionTimeoutError on timeout."""
+113 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+114 mock_session = AsyncMock()
+115 mock_session.request.side_effect = asyncio.TimeoutError()
+116 radio_browser.session = mock_session
+ +118 with pytest.raises(RadioBrowserConnectionTimeoutError):
+119 await radio_browser._request("test")
+ +121 assert radio_browser._host is None
+ +123 @pytest.mark.asyncio
+124 async def test_request_client_error(self, radio_browser, mock_dns_resolver):
+125 """Test that _request raises RadioBrowserConnectionError on client error."""
+126 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+127 mock_session = AsyncMock()
+128 mock_session.request.side_effect = aiohttp.ClientError()
+129 radio_browser.session = mock_session
+ +131 with pytest.raises(RadioBrowserConnectionError):
+132 await radio_browser._request("test")
+ +134 assert radio_browser._host is None
+ +136 @pytest.mark.asyncio
+137 async def test_request_socket_error(self, radio_browser, mock_dns_resolver):
+138 """Test that _request raises RadioBrowserConnectionError on socket error."""
+139 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+140 mock_session = AsyncMock()
+141 mock_session.request.side_effect = socket.gaierror()
+142 radio_browser.session = mock_session
+ +144 with pytest.raises(RadioBrowserConnectionError):
+145 await radio_browser._request("test")
+ +147 assert radio_browser._host is None
+ +149 @pytest.mark.asyncio
+150 async def test_request_invalid_content_type(self, radio_browser, mock_dns_resolver):
+151 """Test that _request raises RadioBrowserError on invalid content type."""
+152 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+153 mock_session = AsyncMock()
+154 mock_response = AsyncMock()
+155 mock_response.status = 200
+156 mock_response.headers = {"Content-Type": "text/plain"}
+157 mock_response.text.return_value = "Not JSON"
+158 mock_session.request.return_value = mock_response
+159 radio_browser.session = mock_session
+ +161 with pytest.raises(RadioBrowserError):
+162 await radio_browser._request("test")
+ +164 @pytest.mark.asyncio
+165 async def test_request_boolean_params(self, radio_browser, mock_dns_resolver):
+166 """Test that _request converts boolean params to lowercase strings."""
+167 with patch("radios.radio_browser.DNSResolver", return_value=mock_dns_resolver):
+168 mock_session = AsyncMock()
+169 mock_response = AsyncMock()
+170 mock_response.headers = {"Content-Type": "application/json"}
+171 mock_response.text.return_value = "{}"
+172 mock_session.request.return_value = mock_response
+173 radio_browser.session = mock_session
+ +175 await radio_browser._request("test", params={"bool_param": True})
+ +177 mock_session.request.assert_called_once()
+178 call_args = mock_session.request.call_args
+179 assert call_args[1]["params"]["bool_param"] == "true"
+ +181 @pytest.mark.asyncio
+182 async def test_stats(self, radio_browser):
+183 """Test the stats method."""
+184 stats_data = {
+185 "supported_version": 1,
+186 "software_version": "2.0.0",
+187 "status": "OK",
+188 "stations": 1000,
+189 "stations_broken": 10,
+190 "tags": 500,
+191 "clicks_last_hour": 100,
+192 "clicks_last_day": 1000,
+193 "languages": 50,
+194 "countries": 100,
+195 }
+ +197 with patch.object(radio_browser, "_request") as mock_request:
+198 mock_request.return_value = orjson.dumps(stats_data)
+ +200 result = await radio_browser.stats()
+ +202 mock_request.assert_called_once_with("stats")
+203 assert isinstance(result, Stats)
+204 assert result.supported_version == 1
+205 assert result.software_version == AwesomeVersion("2.0.0")
+206 assert result.status == "OK"
+207 assert result.stations == 1000
+208 assert result.stations_broken == 10
+209 assert result.tags == 500
+210 assert result.clicks_last_hour == 100
+211 assert result.clicks_last_day == 1000
+212 assert result.languages == 50
+213 assert result.countries == 100
+ +215 @pytest.mark.asyncio
+216 async def test_station_click(self, radio_browser):
+217 """Test the station_click method."""
+218 with patch.object(radio_browser, "_request") as mock_request:
+219 mock_request.return_value = "{}"
+ +221 await radio_browser.station_click(uuid="test-uuid")
+ +223 mock_request.assert_called_once_with("url/test-uuid")
+ +225 @pytest.mark.asyncio
+226 async def test_countries(self, radio_browser):
+227 """Test the countries method with default parameters."""
+228 countries_data = [
+229 {
+230 "name": "US",
+231 "stationcount": "100"
+232 },
+233 {
+234 "name": "GB",
+235 "stationcount": "50"
+236 },
+237 {
+238 "name": "XK", # Kosovo special case
+239 "stationcount": "10"
+240 }
+241 ]
+ +243 with patch.object(radio_browser, "_request") as mock_request:
+244 mock_request.return_value = orjson.dumps(countries_data)
+ +246 result = await radio_browser.countries()
+ +248 mock_request.assert_called_once_with(
+249 "countrycodes",
+250 params={
+251 "hidebroken": False,
+252 "limit": 100000,
+253 "offset": 0,
+254 "order": "name",
+255 "reverse": False,
+256 }
+257 )
+ +259 assert len(result) == 3
+260 assert isinstance(result[0], Country)
+ +262 # Check country name resolution
+263 us_country = next(c for c in result if c.code == "US")
+264 gb_country = next(c for c in result if c.code == "GB")
+265 kosovo_country = next(c for c in result if c.code == "XK")
+ +267 assert us_country.name == "United States"
+268 assert gb_country.name == "United Kingdom"
+269 assert kosovo_country.name == "Kosovo"
+ +271 @pytest.mark.asyncio
+272 async def test_countries_with_custom_parameters(self, radio_browser):
+273 """Test the countries method with custom parameters."""
+274 countries_data = [
+275 {
+276 "name": "US",
+277 "stationcount": "100"
+278 }
+279 ]
+ +281 with patch.object(radio_browser, "_request") as mock_request:
+282 mock_request.return_value = orjson.dumps(countries_data)
+ +284 result = await radio_browser.countries(
+285 hide_broken=True,
+286 limit=10,
+287 offset=5,
+288 order=Order.STATION_COUNT,
+289 reverse=True
+290 )
+ +292 mock_request.assert_called_once_with(
+293 "countrycodes",
+294 params={
+295 "hidebroken": True,
+296 "limit": 10,
+297 "offset": 5,
+298 "order": "stationcount",
+299 "reverse": True,
+300 }
+301 )
+ +303 assert len(result) == 1
+304 assert isinstance(result[0], Country)
+ +306 @pytest.mark.asyncio
+307 async def test_languages(self, radio_browser):
+308 """Test the languages method with default parameters."""
+309 languages_data = [
+310 {
+311 "name": "english",
+312 "iso_639": "en",
+313 "stationcount": "100"
+314 },
+315 {
+316 "name": "spanish",
+317 "iso_639": "es",
+318 "stationcount": "50"
+319 }
+320 ]
+ +322 with patch.object(radio_browser, "_request") as mock_request:
+323 mock_request.return_value = orjson.dumps(languages_data)
+ +325 result = await radio_browser.languages()
+ +327 mock_request.assert_called_once_with(
+328 "languages",
+329 params={
+330 "hidebroken": False,
+331 "limit": 100000,
+332 "offset": 0,
+333 "order": "name",
+334 "reverse": False,
+335 }
+336 )
+ +338 assert len(result) == 2
+339 assert isinstance(result[0], Language)
+ +341 # Check language name capitalization
+342 assert result[0].name == "English"
+343 assert result[1].name == "Spanish"
+344 assert result[0].code == "en"
+345 assert result[1].code == "es"
+346 assert result[0].station_count == "100"
+347 assert result[1].station_count == "50"
+ +349 @pytest.mark.asyncio
+350 async def test_languages_with_custom_parameters(self, radio_browser):
+351 """Test the languages method with custom parameters."""
+352 languages_data = [
+353 {
+354 "name": "english",
+355 "iso_639": "en",
+356 "stationcount": "100"
+357 }
+358 ]
+ +360 with patch.object(radio_browser, "_request") as mock_request:
+361 mock_request.return_value = orjson.dumps(languages_data)
+ +363 result = await radio_browser.languages(
+364 hide_broken=True,
+365 limit=10,
+366 offset=5,
+367 order=Order.STATION_COUNT,
+368 reverse=True
+369 )
+ +371 mock_request.assert_called_once_with(
+372 "languages",
+373 params={
+374 "hidebroken": True,
+375 "limit": 10,
+376 "offset": 5,
+377 "order": "stationcount",
+378 "reverse": True,
+379 }
+380 )
+ +382 assert len(result) == 1
+383 assert isinstance(result[0], Language)
+384 assert result[0].name == "English"
+ +386 @pytest.mark.asyncio
+387 async def test_search_basic(self, radio_browser):
+388 """Test the search method with basic parameters."""
+389 stations_data = [
+390 {
+391 "changeuuid": "change-uuid-1",
+392 "stationuuid": "station-uuid-1",
+393 "name": "Test Station 1",
+394 "url": "http://example.com/stream1",
+395 "url_resolved": "http://example.com/stream1",
+396 "homepage": "http://example.com",
+397 "favicon": "http://example.com/favicon.ico",
+398 "tags": "tag1,tag2",
+399 "country": "United States",
+400 "countrycode": "US",
+401 "state": "California",
+402 "language": "English",
+403 "languagecodes": "en",
+404 "votes": 10,
+405 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+406 "codec": "MP3",
+407 "bitrate": 128,
+408 "hls": False,
+409 "lastcheckok": True,
+410 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+411 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+412 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+413 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+414 "clickcount": 100,
+415 "clicktrend": 1,
+416 "ssl_error": 0,
+417 "geo_lat": 37.7749,
+418 "geo_long": -122.4194,
+419 "has_extended_info": True,
+420 "iso_3166_2": "US-CA"
+421 }
+422 ]
+ +424 with patch.object(radio_browser, "_request") as mock_request:
+425 mock_request.return_value = orjson.dumps(stations_data)
+ +427 result = await radio_browser.search(name="Test")
+ +429 mock_request.assert_called_once_with(
+430 "stations/search",
+431 params={
+432 "hidebroken": False,
+433 "limit": 100000,
+434 "offset": 0,
+435 "order": "name",
+436 "reverse": False,
+437 "name": "Test",
+438 "name_exact": False,
+439 "country": "",
+440 "country_exact": False,
+441 "state_exact": False,
+442 "language_exact": False,
+443 "tag_exact": False,
+444 "bitrate_min": 0,
+445 "bitrate_max": 1000000,
+446 }
+447 )
+ +449 assert len(result) == 1
+450 assert isinstance(result[0], Station)
+451 assert result[0].name == "Test Station 1"
+452 assert result[0].uuid == "station-uuid-1"
+ +454 @pytest.mark.asyncio
+455 async def test_search_with_filter(self, radio_browser):
+456 """Test the search method with filter parameters."""
+457 stations_data = [
+458 {
+459 "changeuuid": "change-uuid-1",
+460 "stationuuid": "station-uuid-1",
+461 "name": "Test Station 1",
+462 "url": "http://example.com/stream1",
+463 "url_resolved": "http://example.com/stream1",
+464 "homepage": "http://example.com",
+465 "favicon": "http://example.com/favicon.ico",
+466 "tags": "tag1,tag2",
+467 "country": "United States",
+468 "countrycode": "US",
+469 "state": "California",
+470 "language": "English",
+471 "languagecodes": "en",
+472 "votes": 10,
+473 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+474 "codec": "MP3",
+475 "bitrate": 128,
+476 "hls": False,
+477 "lastcheckok": True,
+478 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+479 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+480 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+481 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+482 "clickcount": 100,
+483 "clicktrend": 1,
+484 "ssl_error": 0,
+485 "geo_lat": 37.7749,
+486 "geo_long": -122.4194,
+487 "has_extended_info": True,
+488 "iso_3166_2": "US-CA"
+489 }
+490 ]
+ +492 with patch.object(radio_browser, "_request") as mock_request:
+493 mock_request.return_value = orjson.dumps(stations_data)
+ +495 result = await radio_browser.search(
+496 filter_by=FilterBy.TAG,
+497 filter_term="rock",
+498 hide_broken=True,
+499 limit=10,
+500 offset=5,
+501 order=Order.VOTES,
+502 reverse=True,
+503 name_exact=True,
+504 country="US",
+505 country_exact=True,
+506 state_exact=True,
+507 language_exact=True,
+508 tag_exact=True,
+509 bitrate_min=128,
+510 bitrate_max=320
+511 )
+ +513 mock_request.assert_called_once_with(
+514 "stations/search/bytag/rock",
+515 params={
+516 "hidebroken": True,
+517 "limit": 10,
+518 "offset": 5,
+519 "order": "votes",
+520 "reverse": True,
+521 "name": None,
+522 "name_exact": True,
+523 "country": "US",
+524 "country_exact": True,
+525 "state_exact": True,
+526 "language_exact": True,
+527 "tag_exact": True,
+528 "bitrate_min": 128,
+529 "bitrate_max": 320,
+530 }
+531 )
+ +533 assert len(result) == 1
+534 assert isinstance(result[0], Station)
+ +536 @pytest.mark.asyncio
+537 async def test_station_found(self, radio_browser):
+538 """Test the station method when a station is found."""
+539 stations_data = [
+540 {
+541 "changeuuid": "change-uuid-1",
+542 "stationuuid": "test-uuid",
+543 "name": "Test Station",
+544 "url": "http://example.com/stream",
+545 "url_resolved": "http://example.com/stream",
+546 "homepage": "http://example.com",
+547 "favicon": "http://example.com/favicon.ico",
+548 "tags": "tag1,tag2",
+549 "country": "United States",
+550 "countrycode": "US",
+551 "state": "California",
+552 "language": "English",
+553 "languagecodes": "en",
+554 "votes": 10,
+555 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+556 "codec": "MP3",
+557 "bitrate": 128,
+558 "hls": False,
+559 "lastcheckok": True,
+560 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+561 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+562 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+563 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+564 "clickcount": 100,
+565 "clicktrend": 1,
+566 "ssl_error": 0,
+567 "geo_lat": 37.7749,
+568 "geo_long": -122.4194,
+569 "has_extended_info": True,
+570 "iso_3166_2": "US-CA"
+571 }
+572 ]
+ +574 with patch.object(radio_browser, "stations") as mock_stations:
+575 mock_stations.return_value = [Station.from_dict(stations_data[0])]
+ +577 result = await radio_browser.station(uuid="test-uuid")
+ +579 mock_stations.assert_called_once_with(
+580 filter_by=FilterBy.UUID,
+581 filter_term="test-uuid",
+582 limit=1,
+583 )
+ +585 assert isinstance(result, Station)
+586 assert result.uuid == "test-uuid"
+587 assert result.name == "Test Station"
+ +589 @pytest.mark.asyncio
+590 async def test_station_not_found(self, radio_browser):
+591 """Test the station method when a station is not found."""
+592 with patch.object(radio_browser, "stations") as mock_stations:
+593 mock_stations.return_value = []
+ +595 result = await radio_browser.station(uuid="nonexistent-uuid")
+ +597 mock_stations.assert_called_once_with(
+598 filter_by=FilterBy.UUID,
+599 filter_term="nonexistent-uuid",
+600 limit=1,
+601 )
+ +603 assert result is None
+ +605 @pytest.mark.asyncio
+606 async def test_stations_basic(self, radio_browser):
+607 """Test the stations method with basic parameters."""
+608 stations_data = [
+609 {
+610 "changeuuid": "change-uuid-1",
+611 "stationuuid": "station-uuid-1",
+612 "name": "Test Station 1",
+613 "url": "http://example.com/stream1",
+614 "url_resolved": "http://example.com/stream1",
+615 "homepage": "http://example.com",
+616 "favicon": "http://example.com/favicon.ico",
+617 "tags": "tag1,tag2",
+618 "country": "United States",
+619 "countrycode": "US",
+620 "state": "California",
+621 "language": "English",
+622 "languagecodes": "en",
+623 "votes": 10,
+624 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+625 "codec": "MP3",
+626 "bitrate": 128,
+627 "hls": False,
+628 "lastcheckok": True,
+629 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+630 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+631 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+632 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+633 "clickcount": 100,
+634 "clicktrend": 1,
+635 "ssl_error": 0,
+636 "geo_lat": 37.7749,
+637 "geo_long": -122.4194,
+638 "has_extended_info": True,
+639 "iso_3166_2": "US-CA"
+640 }
+641 ]
+ +643 with patch.object(radio_browser, "_request") as mock_request:
+644 mock_request.return_value = orjson.dumps(stations_data)
+ +646 result = await radio_browser.stations()
+ +648 mock_request.assert_called_once_with(
+649 "stations",
+650 params={
+651 "hidebroken": False,
+652 "limit": 100000,
+653 "offset": 0,
+654 "order": "name",
+655 "reverse": False,
+656 }
+657 )
+ +659 assert len(result) == 1
+660 assert isinstance(result[0], Station)
+661 assert result[0].name == "Test Station 1"
+662 assert result[0].uuid == "station-uuid-1"
+ +664 @pytest.mark.asyncio
+665 async def test_stations_with_filter(self, radio_browser):
+666 """Test the stations method with filter parameters."""
+667 stations_data = [
+668 {
+669 "changeuuid": "change-uuid-1",
+670 "stationuuid": "station-uuid-1",
+671 "name": "Test Station 1",
+672 "url": "http://example.com/stream1",
+673 "url_resolved": "http://example.com/stream1",
+674 "homepage": "http://example.com",
+675 "favicon": "http://example.com/favicon.ico",
+676 "tags": "tag1,tag2",
+677 "country": "United States",
+678 "countrycode": "US",
+679 "state": "California",
+680 "language": "English",
+681 "languagecodes": "en",
+682 "votes": 10,
+683 "lastchangetime_iso8601": "2023-01-01T00:00:00Z",
+684 "codec": "MP3",
+685 "bitrate": 128,
+686 "hls": False,
+687 "lastcheckok": True,
+688 "lastchecktime_iso8601": "2023-01-01T00:00:00Z",
+689 "lastcheckoktime_iso8601": "2023-01-01T00:00:00Z",
+690 "lastlocalchecktime_iso8601": "2023-01-01T00:00:00Z",
+691 "clicktimestamp_iso8601": "2023-01-01T00:00:00Z",
+692 "clickcount": 100,
+693 "clicktrend": 1,
+694 "ssl_error": 0,
+695 "geo_lat": 37.7749,
+696 "geo_long": -122.4194,
+697 "has_extended_info": True,
+698 "iso_3166_2": "US-CA"
+699 }
+700 ]
+ +702 with patch.object(radio_browser, "_request") as mock_request:
+703 mock_request.return_value = orjson.dumps(stations_data)
+ +705 result = await radio_browser.stations(
+706 filter_by=FilterBy.COUNTRY,
+707 filter_term="US",
+708 hide_broken=True,
+709 limit=10,
+710 offset=5,
+711 order=Order.VOTES,
+712 reverse=True
+713 )
+ +715 mock_request.assert_called_once_with(
+716 "stations/bycountry/US",
+717 params={
+718 "hidebroken": True,
+719 "limit": 10,
+720 "offset": 5,
+721 "order": "votes",
+722 "reverse": True,
+723 }
+724 )
+ +726 assert len(result) == 1
+727 assert isinstance(result[0], Station)
+ +729 @pytest.mark.asyncio
+730 async def test_tags(self, radio_browser):
+731 """Test the tags method with default parameters."""
+732 tags_data = [
+733 {
+734 "name": "rock",
+735 "stationcount": "100"
+736 },
+737 {
+738 "name": "pop",
+739 "stationcount": "50"
+740 }
+741 ]
+ +743 with patch.object(radio_browser, "_request") as mock_request:
+744 mock_request.return_value = orjson.dumps(tags_data)
+ +746 result = await radio_browser.tags()
+ +748 mock_request.assert_called_once_with(
+749 "tags",
+750 params={
+751 "hidebroken": False,
+752 "limit": 100000,
+753 "offset": 0,
+754 "order": "name",
+755 "reverse": False,
+756 }
+757 )
+ +759 assert len(result) == 2
+760 assert isinstance(result[0], Tag)
+761 assert result[0].name == "rock"
+762 assert result[0].station_count == "100"
+763 assert result[1].name == "pop"
+764 assert result[1].station_count == "50"
+ +766 @pytest.mark.asyncio
+767 async def test_tags_with_custom_parameters(self, radio_browser):
+768 """Test the tags method with custom parameters."""
+769 tags_data = [
+770 {
+771 "name": "rock",
+772 "stationcount": "100"
+773 }
+774 ]
+ +776 with patch.object(radio_browser, "_request") as mock_request:
+777 mock_request.return_value = orjson.dumps(tags_data)
+ +779 result = await radio_browser.tags(
+780 hide_broken=True,
+781 limit=10,
+782 offset=5,
+783 order=Order.STATION_COUNT,
+784 reverse=True
+785 )
+ +787 mock_request.assert_called_once_with(
+788 "tags",
+789 params={
+790 "hidebroken": True,
+791 "limit": 10,
+792 "offset": 5,
+793 "order": "stationcount",
+794 "reverse": True,
+795 }
+796 )
+ +798 assert len(result) == 1
+799 assert isinstance(result[0], Tag)
+800 assert result[0].name == "rock"
+801 assert result[0].station_count == "100" # TODO: Fix this assertion
+ +803 @pytest.mark.asyncio
+804 async def test_close(self, radio_browser):
+805 """Test the close method."""
+806 mock_session = AsyncMock()
+807 radio_browser.session = mock_session
+808 radio_browser._close_session = True
+ +810 await radio_browser.close()
+ +812 mock_session.close.assert_called_once()
+ +814 @pytest.mark.asyncio
+815 async def test_close_no_session(self, radio_browser):
+816 """Test the close method when no session exists."""
+817 radio_browser.session = None
+ +819 await radio_browser.close() # Should not raise an exception
+ +821 @pytest.mark.asyncio
+822 async def test_close_not_owned_session(self, radio_browser):
+823 """Test the close method when session is not owned."""
+824 mock_session = AsyncMock()
+825 radio_browser.session = mock_session
+826 radio_browser._close_session = False
+ +828 await radio_browser.close()
+ +830 mock_session.close.assert_not_called()
+ +832 @pytest.mark.asyncio
+833 async def test_aenter(self, radio_browser):
+834 """Test the __aenter__ method."""
+835 result = await radio_browser.__aenter__()
+836 assert result is radio_browser
+ +838 @pytest.mark.asyncio
+839 async def test_aexit(self, radio_browser):
+840 """Test the __aexit__ method."""
+841 with patch.object(radio_browser, "close") as mock_close:
+842 await radio_browser.__aexit__(None, None, None)
+843 mock_close.assert_called_once()
+ +845 @pytest.mark.asyncio
+846 async def test_async_context_manager(self, radio_browser):
+847 """Test using RadioBrowser as an async context manager."""
+848 with patch.object(radio_browser, "close") as mock_close:
+849 async with radio_browser as rb:
+850 assert rb is radio_browser
+ +852 mock_close.assert_called_once()
+Coverage for src/radios/models.py: 86% + + + + + ++ ++++ Coverage for src/radios/models.py: + 86% +
+ ++ 84 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
+ ++ + + + diff --git a/test-results/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html b/test-results/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html new file mode 100644 index 00000000..871c9ea5 --- /dev/null +++ b/test-results/coverage-final/z_c8b1f7e3f131828c_radio_browser_py.html @@ -0,0 +1,546 @@ + + + + +1"""Models for the Radio Browser API."""
+ +3# pylint: disable=too-few-public-methods
+4from __future__ import annotations
+ +6from dataclasses import dataclass, field
+7from datetime import datetime
+8from typing import cast
+ +10import pycountry
+11from awesomeversion import AwesomeVersion
+12from mashumaro import field_options
+13from mashumaro.mixins.orjson import DataClassORJSONMixin
+14from mashumaro.types import SerializationStrategy
+ + +17class CommaSeparatedString(SerializationStrategy):
+18 """String serialization strategy to handle comma separated strings."""
+ +20 def serialize(self, value: list[str]) -> str:
+21 """Serialize a list of strings to a comma separated value."""
+22 return ",".join(value)
+ +24 def deserialize(self, value: str) -> list[str]:
+25 """Deserialize a comma separated value to a list of strings."""
+26 return [item.strip() for item in value.split(",")]
+ + +29@dataclass
+30# pylint: disable=too-many-instance-attributes
+31class Stats(DataClassORJSONMixin):
+32 """Object holding the Radio Browser stats."""
+ +34 supported_version: int
+35 software_version: AwesomeVersion
+36 status: str
+37 stations: int
+38 stations_broken: int
+39 tags: int
+40 clicks_last_hour: int
+41 clicks_last_day: int
+42 languages: int
+43 countries: int
+ + +46@dataclass
+47# pylint: disable=too-many-instance-attributes
+48class Station(DataClassORJSONMixin):
+49 """Object information for a station from the Radio Browser."""
+ +51 bitrate: int
+52 change_uuid: str = field(metadata=field_options(alias="changeuuid"))
+53 click_count: int = field(metadata=field_options(alias="clickcount"))
+54 click_timestamp: datetime | None = field(
+55 metadata=field_options(alias="clicktimestamp_iso8601")
+56 )
+57 click_trend: int = field(metadata=field_options(alias="clicktrend"))
+58 codec: str
+59 country_code: str = field(metadata=field_options(alias="countrycode"))
+60 favicon: str
+61 latitude: float | None = field(metadata=field_options(alias="geo_lat"))
+62 longitude: float | None = field(metadata=field_options(alias="geo_long"))
+63 has_extended_info: bool
+64 hls: bool
+65 homepage: str
+66 iso_3166_2: str | None
+67 language: list[str] = field(
+68 metadata=field_options(serialization_strategy=CommaSeparatedString())
+69 )
+70 language_codes: list[str] = field(
+71 metadata=field_options(
+72 alias="languagecodes", serialization_strategy=CommaSeparatedString()
+73 )
+74 )
+75 lastchange_time: datetime | None = field(
+76 metadata=field_options(alias="lastchangetime_iso8601")
+77 )
+78 lastcheckok: bool
+79 last_check_ok_time: datetime | None = field(
+80 metadata=field_options(alias="lastcheckoktime_iso8601")
+81 )
+82 last_check_time: datetime | None = field(
+83 metadata=field_options(alias="lastchecktime_iso8601")
+84 )
+85 last_local_check_time: datetime | None = field(
+86 metadata=field_options(alias="lastlocalchecktime_iso8601")
+87 )
+88 name: str
+89 ssl_error: int
+90 state: str
+91 uuid: str = field(metadata=field_options(alias="stationuuid"))
+92 tags: list[str] = field(
+93 metadata=field_options(serialization_strategy=CommaSeparatedString())
+94 )
+95 url_resolved: str
+96 url: str
+97 votes: int
+ +99 @property
+100 def country(self) -> str | None:
+101 """Return country name of this station.
+ +103 Returns
+104 -------
+105 Country name or None if no country code is set.
+ +107 """
+108 if resolved_country := pycountry.countries.get(alpha_2=self.country_code):
+109 return cast("str", resolved_country.name)
+110 return None
+ + +113@dataclass
+114class Country(DataClassORJSONMixin):
+115 """Object information for a Counbtry from the Radio Browser."""
+ +117 code: str
+118 name: str
+119 station_count: str = field(metadata=field_options(alias="stationcount"))
+ +121 @property
+122 def favicon(self) -> str:
+123 """Return the favicon URL for the country.
+ +125 Returns
+126 -------
+127 URL to the favicon.
+ +129 """
+130 return f"https://flagcdn.com/256x192/{self.code.lower()}.png"
+ + +133@dataclass
+134class Language(DataClassORJSONMixin):
+135 """Object information for a Language from the Radio Browser."""
+ +137 code: str | None = field(metadata=field_options(alias="iso_639"))
+138 name: str
+139 station_count: str = field(metadata=field_options(alias="stationcount"))
+ +141 @property
+142 def favicon(self) -> str | None:
+143 """Return the favicon URL for the language.
+ +145 Returns
+146 -------
+147 URL to the favicon.
+ +149 """
+150 if self.code:
+151 return f"https://flagcdn.com/256x192/{self.code.lower()}.png"
+152 return None
+ + +155@dataclass
+156class Tag(DataClassORJSONMixin):
+157 """Object information for a Tag from the Radio Browser."""
+ +159 name: str
+160 station_count: str = field(metadata=field_options(alias="stationcount"))
+Coverage for src/radios/radio_browser.py: 97% + + + + + ++ ++++ Coverage for src/radios/radio_browser.py: + 97% +
+ ++ 111 statements + + + + +
++ « prev + ^ index + » next + + coverage.py v7.8.0, + created at 2025-05-14 09:51 +0000 +
+ ++ + + + diff --git a/test-results/coverage-initial.json b/test-results/coverage-initial.json new file mode 100644 index 00000000..b431d7e2 --- /dev/null +++ b/test-results/coverage-initial.json @@ -0,0 +1 @@ +{"meta": {"format": 3, "version": "7.8.0", "timestamp": "2025-05-14T09:46:51.624321", "branch_coverage": true, "show_contexts": false}, "files": {"src/radios/__init__.py": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/const.py": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"Order": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "FilterBy": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/exceptions.py": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowserError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionTimeoutError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/models.py": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 84, "percent_covered": 85.22727272727273, "percent_covered_display": "85", "missing_lines": 9, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [22, 26, 108, 109, 110, 130, 150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110], [150, 151], [150, 152]], "functions": {"CommaSeparatedString.serialize": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "CommaSeparatedString.deserialize": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [26], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station.country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"CommaSeparatedString": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22, 26], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Stats": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "Tag": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/radio_browser.py": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 74, 80, 82, 86, 90, 91, 92, 103, 104, 105, 116, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 47, "num_statements": 111, "percent_covered": 35.172413793103445, "percent_covered_display": "35", "missing_lines": 64, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 30}, "missing_lines": [75, 76, 77, 78, 83, 84, 87, 88, 89, 106, 107, 108, 109, 110, 111, 112, 113, 114, 126, 127, 142, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 221, 232, 233, 234, 237, 286, 287, 288, 289, 290, 292, 311, 313, 327, 332, 333, 334, 365, 366, 367, 368, 369, 371, 381, 383, 410, 420, 422, 426, 427, 437, 447], "excluded_lines": [], "executed_branches": [[74, 80], [82, 86], [86, 90], [105, 116]], "missing_branches": [[74, 75], [82, 83], [86, 87], [87, 88], [87, 90], [88, 87], [88, 89], [105, 106], [181, 182], [181, 190], [184, 185], [184, 186], [186, 181], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [289, 292], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [368, 371], [426, -424], [426, 427]], "functions": {"RadioBrowser._request": {"executed_lines": [74, 80, 82, 86, 90, 91, 92, 103, 104, 105, 116], "summary": {"covered_lines": 11, "num_statements": 29, "percent_covered": 36.58536585365854, "percent_covered_display": "37", "missing_lines": 18, "excluded_lines": 0, "num_branches": 12, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 8}, "missing_lines": [75, 76, 77, 78, 83, 84, 87, 88, 89, 106, 107, 108, 109, 110, 111, 112, 113, 114], "excluded_lines": [], "executed_branches": [[74, 80], [82, 86], [86, 90], [105, 116]], "missing_branches": [[74, 75], [82, 83], [86, 87], [87, 88], [87, 90], [88, 87], [88, 89], [105, 106]]}, "RadioBrowser.stats": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [126, 127], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.station_click": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [142], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.countries": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 11, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 11, "excluded_lines": 0, "num_branches": 8, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 8}, "missing_lines": [169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194], "excluded_lines": [], "executed_branches": [], "missing_branches": [[181, 182], [181, 190], [184, 185], [184, 186], [186, 181], [186, 187], [190, 191], [190, 194]]}, "RadioBrowser.languages": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 5, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 5, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [221, 232, 233, 234, 237], "excluded_lines": [], "executed_branches": [], "missing_branches": [[233, 234], [233, 237]]}, "RadioBrowser.search": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 8, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 8, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [286, 287, 288, 289, 290, 292, 311, 313], "excluded_lines": [], "executed_branches": [], "missing_branches": [[287, 288], [287, 292], [289, 290], [289, 292]]}, "RadioBrowser.station": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 4, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 4, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [327, 332, 333, 334], "excluded_lines": [], "executed_branches": [], "missing_branches": [[332, 333], [332, 334]]}, "RadioBrowser.stations": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 8, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 8, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [365, 366, 367, 368, 369, 371, 381, 383], "excluded_lines": [], "executed_branches": [], "missing_branches": [[366, 367], [366, 371], [368, 369], [368, 371]]}, "RadioBrowser.tags": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [410, 420, 422], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.close": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [426, 427], "excluded_lines": [], "executed_branches": [], "missing_branches": [[426, -424], [426, 427]]}, "RadioBrowser.__aenter__": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [437], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.__aexit__": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [447], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowser": {"executed_lines": [74, 80, 82, 86, 90, 91, 92, 103, 104, 105, 116], "summary": {"covered_lines": 11, "num_statements": 75, "percent_covered": 13.761467889908257, "percent_covered_display": "14", "missing_lines": 64, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 30}, "missing_lines": [75, 76, 77, 78, 83, 84, 87, 88, 89, 106, 107, 108, 109, 110, 111, 112, 113, 114, 126, 127, 142, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 221, 232, 233, 234, 237, 286, 287, 288, 289, 290, 292, 311, 313, 327, 332, 333, 334, 365, 366, 367, 368, 369, 371, 381, 383, 410, 420, 422, 426, 427, 437, 447], "excluded_lines": [], "executed_branches": [[74, 80], [82, 86], [86, 90], [105, 116]], "missing_branches": [[74, 75], [82, 83], [86, 87], [87, 88], [87, 90], [88, 87], [88, 89], [105, 106], [181, 182], [181, 190], [184, 185], [184, 186], [186, 181], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [289, 292], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [368, 371], [426, -424], [426, 427]]}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}}, "totals": {"covered_lines": 167, "num_statements": 240, "percent_covered": 61.510791366906474, "percent_covered_display": "62", "missing_lines": 73, "excluded_lines": 0, "num_branches": 38, "num_partial_branches": 4, "covered_branches": 4, "missing_branches": 34}} \ No newline at end of file diff --git a/test-results/coverage-post-generation.json b/test-results/coverage-post-generation.json new file mode 100644 index 00000000..1ef8d8e1 --- /dev/null +++ b/test-results/coverage-post-generation.json @@ -0,0 +1 @@ +{"meta": {"format": 3, "version": "7.8.0", "timestamp": "2025-05-14T09:50:02.909090", "branch_coverage": true, "show_contexts": false}, "files": {"src/radios/__init__.py": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 4, 9, 10, 12], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/const.py": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"Order": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "FilterBy": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], "summary": {"covered_lines": 37, "num_statements": 37, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/exceptions.py": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowserError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowserConnectionTimeoutError": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 8, 9, 12, 13], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/models.py": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 26, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 76, "num_statements": 84, "percent_covered": 86.36363636363636, "percent_covered_display": "86", "missing_lines": 8, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 4}, "missing_lines": [22, 108, 109, 110, 130, 150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110], [150, 151], [150, 152]], "functions": {"CommaSeparatedString.serialize": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "CommaSeparatedString.deserialize": {"executed_lines": [26], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station.country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language.favicon": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"CommaSeparatedString": {"executed_lines": [26], "summary": {"covered_lines": 1, "num_statements": 2, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [22], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Stats": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Station": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [108, 109, 110], "excluded_lines": [], "executed_branches": [], "missing_branches": [[108, 109], [108, 110]]}, "Country": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 1, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 1, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [130], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "Language": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 3, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 3, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 2}, "missing_lines": [150, 151, 152], "excluded_lines": [], "executed_branches": [], "missing_branches": [[150, 151], [150, 152]]}, "Tag": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 0, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 6, 7, 8, 10, 11, 12, 13, 14, 17, 18, 20, 24, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 48, 49, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 75, 78, 79, 82, 85, 88, 89, 90, 91, 92, 95, 96, 97, 99, 100, 113, 114, 115, 117, 118, 119, 121, 122, 133, 134, 135, 137, 138, 139, 141, 142, 155, 156, 157, 159, 160], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "src/radios/radio_browser.py": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 118, 126, 127, 129, 142, 145, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 197, 221, 232, 233, 234, 237, 240, 286, 287, 288, 289, 290, 292, 311, 313, 315, 327, 332, 333, 334, 337, 365, 366, 367, 368, 369, 371, 381, 383, 386, 410, 420, 422, 424, 426, 427, 429, 437, 439, 447], "summary": {"covered_lines": 111, "num_statements": 111, "percent_covered": 97.24137931034483, "percent_covered_display": "97", "missing_lines": 0, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 4}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116], [181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [426, -424], [426, 427]], "missing_branches": [[88, 87], [186, 181], [289, 292], [368, 371]], "functions": {"RadioBrowser._request": {"executed_lines": [74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116], "summary": {"covered_lines": 29, "num_statements": 29, "percent_covered": 97.5609756097561, "percent_covered_display": "98", "missing_lines": 0, "excluded_lines": 0, "num_branches": 12, "num_partial_branches": 1, "covered_branches": 11, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116]], "missing_branches": [[88, 87]]}, "RadioBrowser.stats": {"executed_lines": [126, 127], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.station_click": {"executed_lines": [142], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.countries": {"executed_lines": [169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 94.73684210526316, "percent_covered_display": "95", "missing_lines": 0, "excluded_lines": 0, "num_branches": 8, "num_partial_branches": 1, "covered_branches": 7, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194]], "missing_branches": [[186, 181]]}, "RadioBrowser.languages": {"executed_lines": [221, 232, 233, 234, 237], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[233, 234], [233, 237]], "missing_branches": []}, "RadioBrowser.search": {"executed_lines": [286, 287, 288, 289, 290, 292, 311, 313], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 91.66666666666667, "percent_covered_display": "92", "missing_lines": 0, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 1, "covered_branches": 3, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[287, 288], [287, 292], [289, 290]], "missing_branches": [[289, 292]]}, "RadioBrowser.station": {"executed_lines": [327, 332, 333, 334], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[332, 333], [332, 334]], "missing_branches": []}, "RadioBrowser.stations": {"executed_lines": [365, 366, 367, 368, 369, 371, 381, 383], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 91.66666666666667, "percent_covered_display": "92", "missing_lines": 0, "excluded_lines": 0, "num_branches": 4, "num_partial_branches": 1, "covered_branches": 3, "missing_branches": 1}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[366, 367], [366, 371], [368, 369]], "missing_branches": [[368, 371]]}, "RadioBrowser.tags": {"executed_lines": [410, 420, 422], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.close": {"executed_lines": [426, 427], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 2, "num_partial_branches": 0, "covered_branches": 2, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[426, -424], [426, 427]], "missing_branches": []}, "RadioBrowser.__aenter__": {"executed_lines": [437], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "RadioBrowser.__aexit__": {"executed_lines": [447], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"RadioBrowser": {"executed_lines": [74, 75, 76, 77, 78, 80, 82, 83, 84, 86, 87, 88, 89, 90, 91, 92, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 126, 127, 142, 169, 180, 181, 182, 184, 185, 186, 187, 190, 191, 194, 221, 232, 233, 234, 237, 286, 287, 288, 289, 290, 292, 311, 313, 327, 332, 333, 334, 365, 366, 367, 368, 369, 371, 381, 383, 410, 420, 422, 426, 427, 437, 447], "summary": {"covered_lines": 75, "num_statements": 75, "percent_covered": 96.3302752293578, "percent_covered_display": "96", "missing_lines": 0, "excluded_lines": 0, "num_branches": 34, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 4}, "missing_lines": [], "excluded_lines": [], "executed_branches": [[74, 75], [74, 80], [82, 83], [82, 86], [86, 87], [86, 90], [87, 88], [87, 90], [88, 89], [105, 106], [105, 116], [181, 182], [181, 190], [184, 185], [184, 186], [186, 187], [190, 191], [190, 194], [233, 234], [233, 237], [287, 288], [287, 292], [289, 290], [332, 333], [332, 334], [366, 367], [366, 371], [368, 369], [426, -424], [426, 427]], "missing_branches": [[88, 87], [186, 181], [289, 292], [368, 371]]}, "": {"executed_lines": [1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 25, 28, 29, 30, 32, 34, 35, 37, 38, 40, 43, 118, 129, 145, 197, 240, 315, 337, 386, 424, 429, 439], "summary": {"covered_lines": 36, "num_statements": 36, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/__init__.py": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 4, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"load_fixture": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 3, 6], "summary": {"covered_lines": 2, "num_statements": 4, "percent_covered": 50.0, "percent_covered_display": "50", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [8, 9], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/test_radio_browser.py": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 25, 28, 29, 31, 32, 33, 34, 35, 36, 39, 40, 46, 47, 56, 57, 59, 60, 62, 63, 64, 65, 66, 67, 69, 71, 74, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108, 110, 111, 113, 114, 115, 116, 118, 119, 121, 123, 124, 126, 127, 128, 129, 131, 132, 134, 136, 137, 139, 140, 141, 142, 144, 145, 147, 149, 150, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 164, 165, 167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179, 181, 182, 184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 215, 216, 218, 219, 221, 223, 225, 226, 228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269, 271, 272, 274, 281, 282, 284, 292, 303, 304, 306, 307, 309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347, 349, 350, 352, 360, 361, 363, 371, 382, 383, 384, 386, 387, 389, 424, 425, 427, 429, 449, 450, 451, 452, 454, 455, 457, 492, 493, 495, 513, 533, 534, 536, 537, 539, 574, 575, 577, 579, 585, 586, 587, 589, 590, 592, 593, 595, 597, 603, 605, 606, 608, 643, 644, 646, 648, 659, 660, 661, 662, 664, 665, 667, 702, 703, 705, 715, 726, 727, 729, 730, 732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764, 766, 767, 769, 776, 777, 779, 787, 798, 799, 800, 801, 803, 804, 806, 807, 808, 810, 812, 814, 815, 817, 819, 821, 822, 824, 825, 826, 828, 830, 832, 833, 835, 836, 838, 839, 841, 842, 843, 845, 846, 848, 849, 850, 852], "summary": {"covered_lines": 306, "num_statements": 313, "percent_covered": 97.76357827476038, "percent_covered_display": "98", "missing_lines": 7, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43, 49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"radio_browser": {"executed_lines": [25], "summary": {"covered_lines": 1, "num_statements": 1, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_dns_resolver": {"executed_lines": [31, 32, 33, 34, 35, 36], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_session": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 2, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 2, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "mock_response": {"executed_lines": [], "summary": {"covered_lines": 0, "num_statements": 5, "percent_covered": 0.0, "percent_covered_display": "0", "missing_lines": 5, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_dns_resolution": {"executed_lines": [62, 63, 64, 65, 66, 67, 69, 71, 74], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_creates_session_if_none": {"executed_lines": [79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91], "summary": {"covered_lines": 12, "num_statements": 12, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_uses_existing_session": {"executed_lines": [96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_timeout": {"executed_lines": [113, 114, 115, 116, 118, 119, 121], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_client_error": {"executed_lines": [126, 127, 128, 129, 131, 132, 134], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_socket_error": {"executed_lines": [139, 140, 141, 142, 144, 145, 147], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_invalid_content_type": {"executed_lines": [152, 153, 154, 155, 156, 157, 158, 159, 161, 162], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_request_boolean_params": {"executed_lines": [167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stats": {"executed_lines": [184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213], "summary": {"covered_lines": 16, "num_statements": 16, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_click": {"executed_lines": [218, 219, 221, 223], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_countries": {"executed_lines": [228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269], "summary": {"covered_lines": 13, "num_statements": 13, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_countries_with_custom_parameters": {"executed_lines": [274, 281, 282, 284, 292, 303, 304], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_languages": {"executed_lines": [309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347], "summary": {"covered_lines": 13, "num_statements": 13, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_languages_with_custom_parameters": {"executed_lines": [352, 360, 361, 363, 371, 382, 383, 384], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_search_basic": {"executed_lines": [389, 424, 425, 427, 429, 449, 450, 451, 452], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_search_with_filter": {"executed_lines": [457, 492, 493, 495, 513, 533, 534], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_found": {"executed_lines": [539, 574, 575, 577, 579, 585, 586, 587], "summary": {"covered_lines": 8, "num_statements": 8, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_station_not_found": {"executed_lines": [592, 593, 595, 597, 603], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stations_basic": {"executed_lines": [608, 643, 644, 646, 648, 659, 660, 661, 662], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_stations_with_filter": {"executed_lines": [667, 702, 703, 705, 715, 726, 727], "summary": {"covered_lines": 7, "num_statements": 7, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_tags": {"executed_lines": [732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764], "summary": {"covered_lines": 11, "num_statements": 11, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_tags_with_custom_parameters": {"executed_lines": [769, 776, 777, 779, 787, 798, 799, 800, 801], "summary": {"covered_lines": 9, "num_statements": 9, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close": {"executed_lines": [806, 807, 808, 810, 812], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close_no_session": {"executed_lines": [817, 819], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_close_not_owned_session": {"executed_lines": [824, 825, 826, 828, 830], "summary": {"covered_lines": 5, "num_statements": 5, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_aenter": {"executed_lines": [835, 836], "summary": {"covered_lines": 2, "num_statements": 2, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_aexit": {"executed_lines": [841, 842, 843], "summary": {"covered_lines": 3, "num_statements": 3, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "TestRadioBrowser.test_async_context_manager": {"executed_lines": [848, 849, 850, 852], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 28, 29, 39, 40, 46, 47, 56, 57, 59, 60, 76, 77, 93, 94, 110, 111, 123, 124, 136, 137, 149, 150, 164, 165, 181, 182, 215, 216, 225, 226, 271, 272, 306, 307, 349, 350, 386, 387, 454, 455, 536, 537, 589, 590, 605, 606, 664, 665, 729, 730, 766, 767, 803, 804, 814, 815, 821, 822, 832, 833, 838, 839, 845, 846], "summary": {"covered_lines": 78, "num_statements": 78, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"TestRadioBrowser": {"executed_lines": [62, 63, 64, 65, 66, 67, 69, 71, 74, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 96, 97, 98, 99, 100, 101, 102, 103, 105, 107, 108, 113, 114, 115, 116, 118, 119, 121, 126, 127, 128, 129, 131, 132, 134, 139, 140, 141, 142, 144, 145, 147, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 167, 168, 169, 170, 171, 172, 173, 175, 177, 178, 179, 184, 197, 198, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 218, 219, 221, 223, 228, 243, 244, 246, 248, 259, 260, 263, 264, 265, 267, 268, 269, 274, 281, 282, 284, 292, 303, 304, 309, 322, 323, 325, 327, 338, 339, 342, 343, 344, 345, 346, 347, 352, 360, 361, 363, 371, 382, 383, 384, 389, 424, 425, 427, 429, 449, 450, 451, 452, 457, 492, 493, 495, 513, 533, 534, 539, 574, 575, 577, 579, 585, 586, 587, 592, 593, 595, 597, 603, 608, 643, 644, 646, 648, 659, 660, 661, 662, 667, 702, 703, 705, 715, 726, 727, 732, 743, 744, 746, 748, 759, 760, 761, 762, 763, 764, 769, 776, 777, 779, 787, 798, 799, 800, 801, 806, 807, 808, 810, 812, 817, 819, 824, 825, 826, 828, 830, 835, 836, 841, 842, 843, 848, 849, 850, 852], "summary": {"covered_lines": 221, "num_statements": 221, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 18, 19, 22, 23, 25, 28, 29, 31, 32, 33, 34, 35, 36, 39, 40, 46, 47, 56, 57, 59, 60, 76, 77, 93, 94, 110, 111, 123, 124, 136, 137, 149, 150, 164, 165, 181, 182, 215, 216, 225, 226, 271, 272, 306, 307, 349, 350, 386, 387, 454, 455, 536, 537, 589, 590, 605, 606, 664, 665, 729, 730, 766, 767, 803, 804, 814, 815, 821, 822, 832, 833, 838, 839, 845, 846], "summary": {"covered_lines": 85, "num_statements": 92, "percent_covered": 92.3913043478261, "percent_covered_display": "92", "missing_lines": 7, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [42, 43, 49, 50, 51, 52, 53], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}, "tests/test_radios.py": {"executed_lines": [1, 4, 5, 7, 10, 12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": [], "functions": {"test_json_request": {"executed_lines": [12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 6, "num_statements": 6, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}, "": {"executed_lines": [1, 4, 5, 7, 10], "summary": {"covered_lines": 4, "num_statements": 4, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}, "classes": {"": {"executed_lines": [1, 4, 5, 7, 10, 12, 22, 23, 24, 25, 26], "summary": {"covered_lines": 10, "num_statements": 10, "percent_covered": 100.0, "percent_covered_display": "100", "missing_lines": 0, "excluded_lines": 0, "num_branches": 0, "num_partial_branches": 0, "covered_branches": 0, "missing_branches": 0}, "missing_lines": [], "excluded_lines": [], "executed_branches": [], "missing_branches": []}}}}, "totals": {"covered_lines": 550, "num_statements": 567, "percent_covered": 95.86776859504133, "percent_covered_display": "96", "missing_lines": 17, "excluded_lines": 0, "num_branches": 38, "num_partial_branches": 4, "covered_branches": 30, "missing_branches": 8}} \ No newline at end of file diff --git a/test-results/experiment_data_complete_20250514_095124.zip b/test-results/experiment_data_complete_20250514_095124.zip new file mode 100644 index 0000000000000000000000000000000000000000..5de0a42a2cf04d7111a10204e949aa667f08047d GIT binary patch literal 151397 zcmagF1CTC3w=LMGZR@mc+kM)$ZQJfXZQHhO+qP}netrITU(C#XGjA$#XJyseQ59c& zk(qn#y-HRB2pAdQ-(e|TrT(A6e|3;QXFYpIGh;miM+aKj|4%>oA3qZ#Ya@F-M1"""Asynchronous Python client for the Radio Browser API."""
+ +3from __future__ import annotations
+ +5import asyncio
+6import random
+7import socket
+8from dataclasses import dataclass
+9from typing import Any, Self
+ +11import aiohttp
+12import backoff
+13import orjson
+14import pycountry
+15from aiodns import DNSResolver
+16from aiohttp import hdrs
+17from yarl import URL
+ +19from .const import FilterBy, Order
+20from .exceptions import (
+21 RadioBrowserConnectionError,
+22 RadioBrowserConnectionTimeoutError,
+23 RadioBrowserError,
+24)
+25from .models import Country, Language, Station, Stats, Tag
+ + +28@dataclass
+29class RadioBrowser:
+30 """Main class for handling connections with the Radio Browser API."""
+ +32 user_agent: str
+ +34 request_timeout: float = 8.0
+35 session: aiohttp.client.ClientSession | None = None
+ +37 _close_session: bool = False
+38 _host: str | None = None
+ +40 @backoff.on_exception(
+41 backoff.expo, RadioBrowserConnectionError, max_tries=5, logger=None
+42 )
+43 async def _request(
+44 self,
+45 uri: str = "",
+46 method: str = hdrs.METH_GET,
+47 params: dict[str, Any] | None = None,
+48 ) -> str:
+49 """Handle a request to the Radio Browser API.
+ +51 A generic method for sending/handling HTTP requests done against
+52 the Radio Browser API.
+ +54 Args:
+55 ----
+56 uri: Request URI, for example `stats`.
+57 method: HTTP method to use for the request.E.g., "GET" or "POST".
+58 params: Dictionary of data to send to the Radio Browser API.
+ +60 Returns:
+61 -------
+62 The response from the Radio Browser API.
+ +64 Raises:
+65 ------
+66 RadioBrowserConnectionError: An error occurred while communication with
+67 the Radio Browser API.
+68 RadioBrowserConnectionTimeoutError: A timeout occurred while communicating
+69 with the Radio Browser API.
+70 RadioBrowserError: Received an unexpected response from the
+71 Radio Browser API.
+ +73 """
+74 if self._host is None:
+75 resolver = DNSResolver()
+76 result = await resolver.query("_api._tcp.radio-browser.info", "SRV")
+77 random.shuffle(result)
+78 self._host = result[0].host
+ +80 url = URL.build(scheme="https", host=self._host, path="/json/").join(URL(uri))
+ +82 if self.session is None:
+83 self.session = aiohttp.ClientSession()
+84 self._close_session = True
+ +86 if params:
+87 for key, value in params.items():
+88 if isinstance(value, bool): 88 ↛ 87line 88 didn't jump to line 87 because the condition on line 88 was always true
+89 params[key] = str(value).lower()
+90 try:
+91 async with asyncio.timeout(self.request_timeout):
+92 response = await self.session.request(
+93 method,
+94 url,
+95 headers={
+96 "User-Agent": self.user_agent,
+97 "Accept": "application/json",
+98 },
+99 params=params,
+100 raise_for_status=True,
+101 )
+ +103 content_type = response.headers.get("Content-Type", "")
+104 text = await response.text()
+105 if "application/json" not in content_type:
+106 raise RadioBrowserError(response.status, {"message": text})
+107 except asyncio.TimeoutError as exception:
+108 self._host = None
+109 msg = "Timeout occurred while connecting to the Radio Browser API"
+110 raise RadioBrowserConnectionTimeoutError(msg) from exception
+111 except (aiohttp.ClientError, socket.gaierror) as exception:
+112 self._host = None
+113 msg = "Error occurred while communicating with the Radio Browser API"
+114 raise RadioBrowserConnectionError(msg) from exception
+ +116 return text
+ +118 async def stats(self) -> Stats:
+119 """Get Radio Browser service stats.
+ +121 Returns
+122 -------
+123 A Stats object, with information about the Radio Browser API.
+ +125 """
+126 response = await self._request("stats")
+127 return Stats.from_json(response)
+ +129 async def station_click(self, *, uuid: str) -> None:
+130 """Register click on a station.
+ +132 Increase the click count of a station by one. This should be called
+133 every time when a user starts playing a stream to mark the stream more
+134 popular than others. Every call to this endpoint from the same IP
+135 address and for the same station only gets counted once per day.
+ +137 Args:
+138 ----
+139 uuid: UUID of the station.
+ +141 """
+142 await self._request(f"url/{uuid}")
+ +144 # pylint: disable-next=too-many-arguments
+145 async def countries(
+146 self,
+147 *,
+148 hide_broken: bool = False,
+149 limit: int = 100000,
+150 offset: int = 0,
+151 order: Order = Order.NAME,
+152 reverse: bool = False,
+153 ) -> list[Country]:
+154 """Get list of available countries.
+ +156 Args:
+157 ----
+158 hide_broken: Do not count broken stations.
+159 limit: Limit the number of results.
+160 offset: Offset the results.
+161 order: Order the results.
+162 reverse: Reverse the order of the results.
+ +164 Returns:
+165 -------
+166 A Stats object, with information about the Radio Browser API.
+ +168 """
+169 countries_data = await self._request(
+170 "countrycodes",
+171 params={
+172 "hidebroken": hide_broken,
+173 "limit": limit,
+174 "offset": offset,
+175 "order": order.value,
+176 "reverse": reverse,
+177 },
+178 )
+ +180 countries = orjson.loads(countries_data) # pylint: disable=no-member
+181 for country in countries: # pylint: disable=not-an-iterable
+182 country["code"] = country["name"]
+183 # https://github.com/frenck/python-radios/issues/19
+184 if country["name"] == "XK":
+185 country["name"] = "Kosovo"
+186 elif resolved_country := pycountry.countries.get(alpha_2=country["name"]): 186 ↛ 181line 186 didn't jump to line 181 because the condition on line 186 was always true
+187 country["name"] = resolved_country.name
+ +189 # Because we enrichted the countries we need to re-order in this case
+190 if order == Order.NAME:
+191 countries.sort(key=lambda country: country["name"])
+ +193 # pylint: disable-next=not-an-iterable
+194 return [Country.from_dict(country) for country in countries]
+ +196 # pylint: disable-next=too-many-arguments
+197 async def languages(
+198 self,
+199 *,
+200 hide_broken: bool = False,
+201 limit: int = 100000,
+202 offset: int = 0,
+203 order: Order = Order.NAME,
+204 reverse: bool = False,
+205 ) -> list[Language]:
+206 """Get list of available languages.
+ +208 Args:
+209 ----
+210 hide_broken: Do not count broken stations.
+211 limit: Limit the number of results.
+212 offset: Offset the results.
+213 order: Order the results.
+214 reverse: Reverse the order of the results.
+ +216 Returns:
+217 -------
+218 A list of Language objects.
+ +220 """
+221 languages_data = await self._request(
+222 "languages",
+223 params={
+224 "hidebroken": hide_broken,
+225 "offset": offset,
+226 "order": order.value,
+227 "reverse": reverse,
+228 "limit": limit,
+229 },
+230 )
+ +232 languages = orjson.loads(languages_data) # pylint: disable=no-member
+233 for language in languages: # pylint: disable=not-an-iterable
+234 language["name"] = language["name"].title()
+ +236 # pylint: disable-next=not-an-iterable
+237 return [Language.from_dict(language) for language in languages]
+ +239 # pylint: disable-next=too-many-arguments, too-many-locals
+240 async def search( # noqa: PLR0913
+241 self,
+242 *,
+243 filter_by: FilterBy | None = None,
+244 filter_term: str | None = None,
+245 hide_broken: bool = False,
+246 limit: int = 100000,
+247 offset: int = 0,
+248 order: Order = Order.NAME,
+249 reverse: bool = False,
+250 name: str | None = None,
+251 name_exact: bool = False,
+252 country: str | None = "",
+253 country_exact: bool = False,
+254 state_exact: bool = False,
+255 language_exact: bool = False,
+256 tag_exact: bool = False,
+257 bitrate_min: int = 0,
+258 bitrate_max: int = 1000000,
+259 ) -> list[Station]:
+260 """Get list of radio stations.
+ +262 Args:
+263 ----
+264 filter_by: Filter the results by a specific field.
+265 filter_term: Search term to filter the results.
+266 hide_broken: Do not count broken stations.
+267 limit: Limit the number of results.
+268 offset: Offset the results.
+269 order: Order the results.
+270 reverse: Reverse the order of the results.
+271 name: Search by name.
+272 name_exact: Search by exact name.
+273 country: Search by country.
+274 country_exact: Search by exact country.
+275 state_exact: Search by exact state.
+276 language_exact: Search by exact language.
+277 tag_exact: Search by exact tag.
+278 bitrate_min: Search by minimum bitrate.
+279 bitrate_max: Search by maximum bitrate.
+ +281 Returns:
+282 -------
+283 A list of Station objects.
+ +285 """
+286 uri = "stations/search"
+287 if filter_by is not None:
+288 uri = f"{uri}/{filter_by.value}"
+289 if filter_term is not None: 289 ↛ 292line 289 didn't jump to line 292 because the condition on line 289 was always true
+290 uri = f"{uri}/{filter_term}"
+ +292 stations_data = await self._request(
+293 uri,
+294 params={
+295 "hidebroken": hide_broken,
+296 "offset": offset,
+297 "order": order.value,
+298 "reverse": reverse,
+299 "limit": limit,
+300 "name": name,
+301 "name_exact": name_exact,
+302 "country": country,
+303 "country_exact": country_exact,
+304 "state_exact": state_exact,
+305 "language_exact": language_exact,
+306 "tag_exact": tag_exact,
+307 "bitrate_min": bitrate_min,
+308 "bitrate_max": bitrate_max,
+309 },
+310 )
+311 stations = orjson.loads(stations_data) # pylint: disable=no-member
+312 # pylint: disable-next=not-an-iterable
+313 return [Station.from_dict(station) for station in stations]
+ +315 async def station(self, *, uuid: str) -> Station | None:
+316 """Get station by UUID.
+ +318 Args:
+319 ----
+320 uuid: UUID of the station.
+ +322 Returns:
+323 -------
+324 A Station object if found.
+ +326 """
+327 stations = await self.stations(
+328 filter_by=FilterBy.UUID,
+329 filter_term=uuid,
+330 limit=1,
+331 )
+332 if not stations:
+333 return None
+334 return stations[0]
+ +336 # pylint: disable-next=too-many-arguments
+337 async def stations( # noqa: PLR0913
+338 self,
+339 *,
+340 filter_by: FilterBy | None = None,
+341 filter_term: str | None = None,
+342 hide_broken: bool = False,
+343 limit: int = 100000,
+344 offset: int = 0,
+345 order: Order = Order.NAME,
+346 reverse: bool = False,
+347 ) -> list[Station]:
+348 """Get list of radio stations.
+ +350 Args:
+351 ----
+352 filter_by: Filter the results by a specific field.
+353 filter_term: Search term to filter the results.
+354 hide_broken: Do not count broken stations.
+355 limit: Limit the number of results.
+356 offset: Offset the results.
+357 order: Order the results.
+358 reverse: Reverse the order of the results.
+ +360 Returns:
+361 -------
+362 A list of Station objects.
+ +364 """
+365 uri = "stations"
+366 if filter_by is not None:
+367 uri = f"{uri}/{filter_by.value}"
+368 if filter_term is not None: 368 ↛ 371line 368 didn't jump to line 371 because the condition on line 368 was always true
+369 uri = f"{uri}/{filter_term}"
+ +371 stations_data = await self._request(
+372 uri,
+373 params={
+374 "hidebroken": hide_broken,
+375 "offset": offset,
+376 "order": order.value,
+377 "reverse": reverse,
+378 "limit": limit,
+379 },
+380 )
+381 stations = orjson.loads(stations_data) # pylint: disable=no-member
+382 # pylint: disable-next=not-an-iterable
+383 return [Station.from_dict(station) for station in stations]
+ +385 # pylint: disable-next=too-many-arguments
+386 async def tags(
+387 self,
+388 *,
+389 hide_broken: bool = False,
+390 limit: int = 100000,
+391 offset: int = 0,
+392 order: Order = Order.NAME,
+393 reverse: bool = False,
+394 ) -> list[Tag]:
+395 """Get list of available tags.
+ +397 Args:
+398 ----
+399 hide_broken: Do not count broken stations.
+400 limit: Limit the number of results.
+401 offset: Offset the results.
+402 order: Order the results.
+403 reverse: Reverse the order of the results.
+ +405 Returns:
+406 -------
+407 A list of Tags objects.
+ +409 """
+410 tags_data = await self._request(
+411 "tags",
+412 params={
+413 "hidebroken": hide_broken,
+414 "offset": offset,
+415 "order": order.value,
+416 "reverse": reverse,
+417 "limit": limit,
+418 },
+419 )
+420 tags = orjson.loads(tags_data) # pylint: disable=no-member
+421 # pylint: disable-next=not-an-iterable
+422 return [Tag.from_dict(tag) for tag in tags]
+ +424 async def close(self) -> None:
+425 """Close open client session."""
+426 if self.session and self._close_session:
+427 await self.session.close()
+ +429 async def __aenter__(self) -> Self:
+430 """Async enter.
+ +432 Returns
+433 -------
+434 The RadioBrowser object.
+ +436 """
+437 return self
+ +439 async def __aexit__(self, *_exc_info: object) -> None:
+440 """Async exit.
+ +442 Args:
+443 ----
+444 _exc_info: Exec type.
+ +446 """
+447 await self.close()
+-Os` z@LtO*7ZK^H1GQ@Mh)%cZ`zxVEw?v5>PjbG!i2-SVYJd%uaHhOD)1PggVrWot1SrQ0 z^E{z_+O|*5H6pe={+LXtTRB7gs)=STo)fjQ8Vjh>y9Db;Al9;&PSJG3T$Gm8DrN@u zpr19k!FEiVLGx^9a2}ocgm-`I8m4sRtef*z9^H#=J-Oz`C}QKLJ?gagZ*PA` tf|g_`>`g?u%@M@; 1Kz?nY*0d7*i z!3HN@Eh9>EopcU*4xw8&R9KLuNn$Fuq!!F~qo(P=6fp7dwU1}l%pvClIh{Y#xEP*v z*qR$;*5<}!9a=^1*TmcP8z*72hj_5An^ym}D~_&SiHHhzU9aWFI%IssnhC(4VLo(M z5*nywr_Xo)Z>qDlC*{) 5d_*uW|Z)PllwREnmBuu*2`JEQBVTLQOx&`X^RNm$bOk FL02HvPE9U8 WA!`xZuW%)0%hJ)B^adMA%THw=ql+$|J(Al68;W=U zns5Tjoeuq_E&NF>h{Po#EF6aEyadEZb}D-IEYJ=P2sDICK9A>(Ze(1l0q(+CFlTC} zM+8lI !HHG*#6lf+|{_u?M&KM{B*@oUA WOsw#2jclow-SkiC%t_)|v`_@cgYc`AS{c3p*sYyZg z_Vsc>Lk+8&NE>k|)wrM+pubcoo541aWC4>aO`mxu>%j`Jp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