diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Python3_Driver_Testing.md | 28 | ||||
| -rw-r--r-- | tests/__init__.py | 1 | ||||
| -rw-r--r-- | tests/__pycache__/__init__.cpython-310.pyc | bin | 3240 -> 3265 bytes | |||
| -rw-r--r-- | tests/__pycache__/base.cpython-310.pyc | bin | 4347 -> 5292 bytes | |||
| -rw-r--r-- | tests/__pycache__/conftest.cpython-310-pytest-7.1.3.pyc | bin | 0 -> 1030 bytes | |||
| -rw-r--r-- | tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc | bin | 5083 -> 5055 bytes | |||
| -rw-r--r-- | tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc | bin | 5762 -> 6940 bytes | |||
| -rw-r--r-- | tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc | bin | 1635 -> 2445 bytes | |||
| -rw-r--r-- | tests/base.py | 36 | ||||
| -rw-r--r-- | tests/conftest.py | 15 | ||||
| -rw-r--r--[-rwxr-xr-x] | tests/images/BTECH_UV-2501+220.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/BTECH_UV-25X2.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/BTECH_UV-25X4.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/BTECH_UV-5001.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/BTECH_UV-50X2.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/BTECH_UV-5X3.img | bin | 8206 -> 8206 bytes | |||
| -rw-r--r-- | tests/images/Baofeng_5RM.img | bin | 0 -> 33849 bytes | |||
| -rw-r--r-- | tests/images/Baofeng_5RX.img | bin | 0 -> 8373 bytes | |||
| -rw-r--r-- | tests/images/Baofeng_BF-T20.img | bin | 0 -> 1205 bytes | |||
| -rw-r--r-- | tests/images/Baofeng_BF-T20FRS.img | bin | 0 -> 1205 bytes | |||
| -rw-r--r-- | tests/images/Baofeng_UV-17.img | bin | 0 -> 37038 bytes | |||
| -rw-r--r-- | tests/images/Baofeng_UV-17Pro.img | bin | 0 -> 33849 bytes | |||
| -rw-r--r-- | tests/images/Baofeng_UV-17ProGPS.img | bin | 0 -> 33868 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Baofeng_UV-6R.img | bin | 8200 -> 8200 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Feidaxin_FD-268A.img | bin | 2048 -> 2048 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Feidaxin_FD-268B.img | bin | 2048 -> 2048 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Feidaxin_FD-288B.img | bin | 2048 -> 2048 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Icom_IC-P7.img | bin | 29952 -> 29952 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Icom_IC-V80.img | bin | 3885 -> 3885 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Icom_ID-51_Plus.img | bin | 129856 -> 129856 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Icom_ID-80H.img | bin | 63149 -> 63149 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/KYD_IP-620.img | bin | 8192 -> 8192 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/KYD_NC-630A.img | bin | 824 -> 824 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Kenwood_TH-D74_clone_mode.img | bin | 500653 -> 500653 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Kenwood_TK-272G.img | bin | 32768 -> 32768 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Kenwood_TK-760G.img | bin | 32768 -> 32768 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/LUITON_LT-725UV.img | bin | 7176 -> 7176 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Leixen_VV-898S.img | bin | 8192 -> 8192 bytes | |||
| -rw-r--r-- | tests/images/MMLradio_JC-8629.img | bin | 0 -> 16573 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/QYT_KT7900D.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/QYT_KT8900D.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r-- | tests/images/Radtel_RT-490.img | bin | 0 -> 16569 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Radtel_T18.img | bin | 1008 -> 1008 bytes | |||
| -rw-r--r-- | tests/images/Retevis_RA79.img | bin | 0 -> 8365 bytes | |||
| -rw-r--r-- | tests/images/Retevis_RA89.img | bin | 0 -> 9041 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Retevis_RT23.img | bin | 4096 -> 4096 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/TDXone_TD-Q8A.img | bin | 8200 -> 8200 bytes | |||
| -rw-r--r-- | tests/images/TIDRADIO_TD-H3.img | bin | 0 -> 8369 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/TYT_TH-UV3R-25.img | bin | 2864 -> 2864 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/WACCOM_MINI-8900.img | bin | 16384 -> 16384 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Yaesu_FT-2900R_1900R.img | bin | 8000 -> 8000 bytes | |||
| -rw-r--r-- | tests/images/Yaesu_FT-450.img | bin | 0 -> 15216 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Yaesu_FT-50.img | bin | 3723 -> 3723 bytes | |||
| -rw-r--r--[-rwxr-xr-x] | tests/images/Yaesu_FTM-7250D_R.img | bin | 65400 -> 65400 bytes | |||
| -rw-r--r-- | tests/py3_driver_testers.txt | 22 | ||||
| -rw-r--r-- | tests/test_brute_force.py | 3 | ||||
| -rw-r--r-- | tests/test_edges.py | 33 | ||||
| -rw-r--r-- | tests/test_settings.py | 24 | ||||
| -rw-r--r-- | tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc | bin | 13541 -> 13846 bytes | |||
| -rw-r--r-- | tests/unit/__pycache__/test_chirp_common.cpython-310-pytest-7.1.3.pyc | bin | 28607 -> 31324 bytes | |||
| -rw-r--r-- | tests/unit/__pycache__/test_wxui_radiothread.cpython-310-pytest-7.1.3.pyc | bin | 3082 -> 4770 bytes | |||
| -rw-r--r-- | tests/unit/test_bitwise.py | 21 | ||||
| -rw-r--r-- | tests/unit/test_chirp_common.py | 84 | ||||
| -rw-r--r-- | tests/unit/test_wxui_radiothread.py | 46 | ||||
| -rw-r--r-- | tests/xfails.txt | 8 |
65 files changed, 304 insertions, 17 deletions
diff --git a/tests/Python3_Driver_Testing.md b/tests/Python3_Driver_Testing.md index 32a1e86..7002a10 100644 --- a/tests/Python3_Driver_Testing.md +++ b/tests/Python3_Driver_Testing.md @@ -5,6 +5,7 @@ | <a name="Abbree_AR-518"></a> Abbree_AR-518 | [@KC9HI](https://github.com/KC9HI) | 16-Dec-2022 | Yes | 0.24% | | <a name="Abbree_AR-63"></a> Abbree_AR-63 | [@KC9HI](https://github.com/KC9HI) | 30-Nov-2022 | Yes | 0.03% | | <a name="Abbree_AR-730"></a> Abbree_AR-730 | [@KC9HI](https://github.com/KC9HI) | 17-Aug-2023 | Yes | | +| <a name="Abbree_AR-869"></a> Abbree_AR-869 | [Implied by Radtel_RT-490](#user-content-Radtel_RT-490) | 11-Nov-2023 | Yes | 0.01% | | <a name="Abbree_AR-F5"></a> Abbree_AR-F5 | [@KC9HI](https://github.com/KC9HI) | 09-Aug-2023 | Yes | | | <a name="Alinco_DJ-G7EG"></a> Alinco_DJ-G7EG | [@HB9UF](https://github.com/HB9UF) | 09-Dec-2022 | Yes | 0.44% | | <a name="Alinco_DJ-G7T"></a> Alinco_DJ-G7T | [Reported working](https://chirp.danplanet.com/issues/10567) | 09-May-2023 | Yes | | @@ -44,6 +45,8 @@ | <a name="BTECH_UV-50X2_G2"></a> BTECH_UV-50X2_G2 | [@KC9HI](https://github.com/KC9HI) | 30-Nov-2022 | Yes | 0.00% | | <a name="BTECH_UV-50X3"></a> BTECH_UV-50X3 | [@KC9HI](https://github.com/KC9HI) | 10-Dec-2022 | Yes | 0.06% | | <a name="BTECH_UV-5X3"></a> BTECH_UV-5X3 | [@KC9HI](https://github.com/KC9HI) | 9-Dec-2022 | Yes | 0.43% | +| <a name="Baofeng_5RM"></a> Baofeng_5RM | [@vdwel](https://github.com/vdwel) | 7-Dec-2023 | Yes | | +| <a name="Baofeng_5RX"></a> Baofeng_5RX | [@KC9HI](https://github.com/KC9HI) | 16-Jan-2024 | Yes | | | <a name="Baofeng_BF-1901"></a> Baofeng_BF-1901 | [@cetinajero](https://github.com/cetinajero) | 3-Jul-2023 | Yes | | | <a name="Baofeng_BF-1904"></a> Baofeng_BF-1904 | [@cetinajero](https://github.com/cetinajero) | 3-Jul-2023 | Yes | | | <a name="Baofeng_BF-888"></a> Baofeng_BF-888 | [@kk7ds](https://github.com/kk7ds) | 13-Feb-2019 | Yes | **15.53%** | @@ -52,11 +55,16 @@ | <a name="Baofeng_BF-F8HP"></a> Baofeng_BF-F8HP | [@KC9HI](https://github.com/KC9HI) | 18-Nov-2022 | Yes | **6.33%** | | <a name="Baofeng_BF-M4"></a> Baofeng_BF-M4 | [@cetinajero](https://github.com/cetinajero) | 8-May-2023 | Yes | | | <a name="Baofeng_BF-T1"></a> Baofeng_BF-T1 | [@KC9HI](https://github.com/KC9HI) | 10-Dec-2022 | Yes | 0.76% | +| <a name="Baofeng_BF-T20"></a> Baofeng_BF-T20 | [@KC9HI](https://github.com/KC9HI) | 15-Dec-2023 | Yes | | +| <a name="Baofeng_BF-T20FRS"></a> Baofeng_BF-T20FRS | [@KC9HI](https://github.com/KC9HI) | 17-Dec-2023 | Yes | | | <a name="Baofeng_BF-T8"></a> Baofeng_BF-T8 | [@KC9HI](https://github.com/KC9HI) | 30-Nov-2022 | Yes | 0.42% | | <a name="Baofeng_BF-V8A"></a> Baofeng_BF-V8A | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.03% | | <a name="Baofeng_F-11"></a> Baofeng_F-11 | [Implied by Baofeng_UV-5R](#user-content-Baofeng_UV-5R) | 18-Nov-2022 | Yes | 0.12% | | <a name="Baofeng_GT-3WP"></a> Baofeng_GT-3WP | [@KC9HI](https://github.com/KC9HI) | 3-Dec-2022 | Yes | 0.43% | | <a name="Baofeng_GT-5R"></a> Baofeng_GT-5R | [@KC9HI](https://github.com/KC9HI) | 18-Nov-2022 | Yes | 0.68% | +| <a name="Baofeng_UV-17"></a> Baofeng_UV-17 | [@vdwel](https://github.com/vdwel) | 27-Nov-2023 | Yes | | +| <a name="Baofeng_UV-17Pro"></a> Baofeng_UV-17Pro | [@vdwel](https://github.com/vdwel) | 27-Nov-2023 | Yes | | +| <a name="Baofeng_UV-17ProGPS"></a> Baofeng_UV-17ProGPS | [@vdwel](https://github.com/vdwel) | 27-Nov-2023 | Yes | | | <a name="Baofeng_UV-3R"></a> Baofeng_UV-3R | [@yarda](https://github.com/yarda) | 26-Sep-2022 | Yes | 0.45% | | <a name="Baofeng_UV-5R"></a> Baofeng_UV-5R | [@lekv](https://github.com/lekv) | 23-Oct-2022 | Yes | **28.81%** | | <a name="Baofeng_UV-6"></a> Baofeng_UV-6 | [Implied by Baofeng_UV-5R](#user-content-Baofeng_UV-5R) | 18-Nov-2022 | Yes | 0.46% | @@ -74,6 +82,7 @@ | <a name="Baojie_BJ-9900"></a> Baojie_BJ-9900 | | | | 0.02% | | <a name="Baojie_BJ-UV55"></a> Baojie_BJ-UV55 | | | Yes | 0.03% | | <a name="Boblov_X3Plus"></a> Boblov_X3Plus | | | | 0.02% | +| <a name="Boristone_8RS"></a> Boristone_8RS | [Implied by Radtel_RT-490](#user-content-Radtel_RT-490) | 11-Nov-2023 | Yes | 0.00% | | <a name="CRT_Micron_UV"></a> CRT_Micron_UV | [Implied by Retevis_RT95](#user-content-Retevis_RT95) | 13-Nov-2022 | Yes | 0.08% | | <a name="CRT_Micron_UV_V2"></a> CRT_Micron_UV_V2 | [Implied by Retevis_RT95](#user-content-Retevis_RT95) | 13-Nov-2022 | Yes | 0.10% | | <a name="Cignus_XTR-5"></a> Cignus_XTR-5 | [Implied by Radioddity_GS-5B](#user-content-Radioddity_GS-5B) | 17-Mar-2023 | Yes | | @@ -89,6 +98,7 @@ | <a name="Feidaxin_FD-460A"></a> Feidaxin_FD-460A | | | | 0.01% | | <a name="Feidaxin_FD-460UH"></a> Feidaxin_FD-460UH | | | | 0.01% | | <a name="Generic_CSV"></a> Generic_CSV | [@kk7ds](https://github.com/kk7ds) | 4-Dec-2022 | | | +| <a name="HamGeek_HG-590"></a> HamGeek_HG-590 | [Implied by Radtel_RT-490](#user-content-Radtel_RT-490) | 11-Nov-2023 | Yes | 0.00% | | <a name="Hiroyasu_HI-8811"></a> Hiroyasu_HI-8811 | [@KC9HI](https://github.com/KC9HI) | 4-Jun-2023 | Yes | | | <a name="HobbyPCB_RS-UV3"></a> HobbyPCB_RS-UV3 | [@kk7ds](https://github.com/kk7ds) | 9-Dec-2022 | Yes | 0.02% | | <a name="Icom_IC-208H"></a> Icom_IC-208H | [Probably works](https://github.com/kk7ds/chirp/blob/py3/chirp/drivers/icf.py) | 12-Dec-2022 | Yes | 0.05% | @@ -129,9 +139,11 @@ | <a name="Icom_ID-880H"></a> Icom_ID-880H | [@kk7ds](https://github.com/kk7ds) | 22-Oct-2022 | Yes | 0.02% | | <a name="Intek_HR-2040"></a> Intek_HR-2040 | [Implied by AnyTone_5888UV](#user-content-AnyTone_5888UV) | 9-Dec-2022 | Yes | 0.02% | | <a name="Intek_KT-980HP"></a> Intek_KT-980HP | [Implied by Baofeng_BF-F8HP](#user-content-Baofeng_BF-F8HP) | 18-Nov-2022 | Yes | 0.04% | +| <a name="JJCC_JC-8629"></a> JJCC_JC-8629 | [Implied by Radtel_RT-490](#user-content-Radtel_RT-490) | 11-Nov-2023 | Yes | | | <a name="Jetstream_JT220M"></a> Jetstream_JT220M | [Implied by Alinco_DR235T](#user-content-Alinco_DR235T) | 12-Dec-2022 | Yes | 0.01% | | <a name="Jetstream_JT270M"></a> Jetstream_JT270M | [Implied by Jetstream_JT270M](#user-content-Jetstream_JT270M) | 13-Dec-2022 | Yes | 0.01% | | <a name="Jetstream_JT270MH"></a> Jetstream_JT270MH | [@kk7ds](https://github.com/kk7ds) | 13-Dec-2022 | Yes | 0.01% | +| <a name="Jianpai_8800_Plus"></a> Jianpai_8800_Plus | [Implied by Radtel_RT-490](#user-content-Radtel_RT-490) | 11-Nov-2023 | Yes | 0.01% | | <a name="KYD_IP-620"></a> KYD_IP-620 | | | | 0.02% | | <a name="KYD_NC-630A"></a> KYD_NC-630A | | | | 0.02% | | <a name="Kenwood_HMK"></a> Kenwood_HMK | [Implied by Generic_CSV](#user-content-Generic_CSV) | 4-Dec-2022 | | 0.00% | @@ -220,6 +232,7 @@ | <a name="Lanchonlh_HG-UV98"></a> Lanchonlh_HG-UV98 | | | Yes | 0.00% | | <a name="Leixen_VV-898"></a> Leixen_VV-898 | [Implied by Jetstream_JT270MH](#user-content-Jetstream_JT270MH) | 13-Dec-2022 | Yes | 0.18% | | <a name="Leixen_VV-898S"></a> Leixen_VV-898S | [@READ10](https://github.com/READ10) | 19-Dec-2022 | Yes | 0.10% | +| <a name="MMLradio_JC-8629"></a> MMLradio_JC-8629 | [@KC9HI](https://github.com/KC9HI) | 11-Nov-2023 | Yes | 0.01% | | <a name="MTC_UV-5R-3"></a> MTC_UV-5R-3 | [Implied by BTECH_UV-5X3](#user-content-BTECH_UV-5X3) | 9-Dec-2022 | Yes | 0.02% | | <a name="Maverick_RA-100"></a> Maverick_RA-100 | [@cetinajero](https://github.com/cetinajero) | 7-Jul-2023 | Yes | | | <a name="Maverick_RA-425"></a> Maverick_RA-425 | [@cetinajero](https://github.com/cetinajero) | 7-Jul-2023 | Yes | | @@ -254,11 +267,14 @@ | <a name="Radtel_RT-470"></a> Radtel_RT-470 | [@KC9HI](https://github.com/KC9HI) | 2-Apr-2023 | Yes | 0.00% | | <a name="Radtel_RT-470L"></a> Radtel_RT-470L | [@KC9HI](https://github.com/KC9HI) | 5-May-2023 | Yes | | | <a name="Radtel_RT-470X"></a> Radtel_RT-470X | [@KC9HI](https://github.com/KC9HI) | 10-Aug-2023 | Yes | | +| <a name="Radtel_RT-490"></a> Radtel_RT-490 | [@KC9HI](https://github.com/KC9HI) | 11-Nov-2023 | Yes | 0.08% | | <a name="Radtel_T18"></a> Radtel_T18 | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.07% | | <a name="Retevis_H777S"></a> Retevis_H777S | [@KC9HI](https://github.com/KC9HI) | 22-Dec-2022 | Yes | | | <a name="Retevis_H777_Plus"></a> Retevis_H777_Plus | [@KC9HI](https://github.com/KC9HI) | 4-Dec-2022 | Yes | 0.06% | | <a name="Retevis_RA685"></a> Retevis_RA685 | [@KC9HI](https://github.com/KC9HI) | 19-Nov-2022 | Yes | 0.25% | +| <a name="Retevis_RA79"></a> Retevis_RA79 | [@KC9HI](https://github.com/KC9HI) | 27-Oct-2023 | Yes | | | <a name="Retevis_RA85"></a> Retevis_RA85 | [@KC9HI](https://github.com/KC9HI) | 19-Nov-2022 | Yes | 0.05% | +| <a name="Retevis_RA89"></a> Retevis_RA89 | [@KC9HI](https://github.com/KC9HI) | 23-Nov-2023 | Yes | | | <a name="Retevis_RB15"></a> Retevis_RB15 | [@KC9HI](https://github.com/KC9HI) | 18-Dec-2022 | Yes | 0.01% | | <a name="Retevis_RB17"></a> Retevis_RB17 | [@KC9HI](https://github.com/KC9HI) | 28-Nov-2022 | Yes | 0.02% | | <a name="Retevis_RB17A"></a> Retevis_RB17A | [@KC9HI](https://github.com/KC9HI) | 30-Nov-2022 | Yes | 0.01% | @@ -327,7 +343,12 @@ | <a name="Ruyage_UV58Plus"></a> Ruyage_UV58Plus | [@KC9HI](https://github.com/KC9HI) | 18-Mar-2023 | Yes | | | <a name="Sainsonic_AP510"></a> Sainsonic_AP510 | | | | 0.00% | | <a name="SenhaiX_8800"></a> SenhaiX_8800 | [Implied by Radioddity_GS-5B](#user-content-Radioddity_GS-5B) | 17-Mar-2023 | Yes | | +| <a name="Socotran_FB-8629"></a> Socotran_FB-8629 | [Implied by Radtel_RT-490](#user-content-Radtel_RT-490) | 11-Nov-2023 | Yes | 0.00% | +| <a name="Socotran_JC-8629"></a> Socotran_JC-8629 | [Implied by Radtel_RT-490](#user-content-Radtel_RT-490) | 11-Nov-2023 | Yes | | | <a name="TDXone_TD-Q8A"></a> TDXone_TD-Q8A | [@KC9HI](https://github.com/KC9HI) | 18-Dec-2022 | | 0.02% | +| <a name="TIDRADIO_TD-H3"></a> TIDRADIO_TD-H3 | [@songjunbiao](https://github.com/songjunbiao) | 1-Dec-2023 | Yes | | +| <a name="TIDRADIO_TD-H3-GMRS"></a> TIDRADIO_TD-H3-GMRS | [@songjunbiao](https://github.com/songjunbiao) | 1-Dec-2023 | Yes | | +| <a name="TIDRADIO_TD-H3-HAM"></a> TIDRADIO_TD-H3-HAM | [@songjunbiao](https://github.com/songjunbiao) | 1-Dec-2023 | Yes | | | <a name="TIDRADIO_TD-H6"></a> TIDRADIO_TD-H6 | [@kk7ds](https://github.com/kk7ds) | 21-Oct-2022 | Yes | 0.43% | | <a name="TIDRADIO_TD-H8"></a> TIDRADIO_TD-H8 | [@Sandmann34](https://github.com/Sandmann34) | 7-Feb-2023 | Yes | | | <a name="TIDRADIO_TD-H8-GMRS"></a> TIDRADIO_TD-H8-GMRS | [@Sandmann34](https://github.com/Sandmann34) | 7-Feb-2023 | Yes | | @@ -382,6 +403,7 @@ | <a name="Yaesu_FT-2800M"></a> Yaesu_FT-2800M | [Reported working](https://chirp.danplanet.com/issues/10616) | 05-Jun-2023 | Yes | 0.03% | | <a name="Yaesu_FT-2900R_1900R"></a> Yaesu_FT-2900R_1900R | [Reported working](https://chirp.danplanet.com/issues/10274) | 14-Jan-2023 | Yes | 0.05% | | <a name="Yaesu_FT-2900R_1900RTXMod_Opened_Xmit"></a> Yaesu_FT-2900R_1900RTXMod_Opened_Xmit | [Implied by Yaesu_FT-2900R_1900R](#user-content-Yaesu_FT-2900R_1900R) | 14-Jan-2023 | Yes | | +| <a name="Yaesu_FT-450"></a> Yaesu_FT-450 | [@WCurlew](https://github.com/WCurlew) | 03-Nov-2023 | Yes | | | <a name="Yaesu_FT-450D"></a> Yaesu_FT-450D | [@Old-Phart](https://github.com/Old-Phart) | 01-Jun-2023 | Yes | 0.01% | | <a name="Yaesu_FT-4VR"></a> Yaesu_FT-4VR | [Implied by Yaesu_FT-4XE](#user-content-Yaesu_FT-4XE) | 24-Dec-2022 | Yes | 0.01% | | <a name="Yaesu_FT-4XE"></a> Yaesu_FT-4XE | Unit tested; needs confirm | 24-Dec-2022 | Yes | 0.14% | @@ -423,11 +445,11 @@ | <a name="Zastone_ZT-X6"></a> Zastone_ZT-X6 | [Implied by Retevis_RT22](#user-content-Retevis_RT22) | 9-Dec-2022 | Yes | 0.11% | ## Stats -**Drivers:** 420 +**Drivers:** 442 -**Tested:** 87% (367/53) (93% of usage stats) +**Tested:** 88% (389/53) (93% of usage stats) -**Byte clean:** 90% (380/40) +**Byte clean:** 90% (402/40) ## Meaning of this testing diff --git a/tests/__init__.py b/tests/__init__.py index 7640296..d076136 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -64,6 +64,7 @@ def _load_tests(loader, tests, pattern, suite=None): pattern = None driver_test_cases = (test_edges.TestCaseEdges, + test_edges.TestBitwiseStrict, test_brute_force.TestCaseBruteForce, test_banks.TestCaseBanks, test_detect.TestCaseDetect, diff --git a/tests/__pycache__/__init__.cpython-310.pyc b/tests/__pycache__/__init__.cpython-310.pyc Binary files differindex 81ff5ea..edcebf1 100644 --- a/tests/__pycache__/__init__.cpython-310.pyc +++ b/tests/__pycache__/__init__.cpython-310.pyc diff --git a/tests/__pycache__/base.cpython-310.pyc b/tests/__pycache__/base.cpython-310.pyc Binary files differindex 2e34e7f..888e3bc 100644 --- a/tests/__pycache__/base.cpython-310.pyc +++ b/tests/__pycache__/base.cpython-310.pyc diff --git a/tests/__pycache__/conftest.cpython-310-pytest-7.1.3.pyc b/tests/__pycache__/conftest.cpython-310-pytest-7.1.3.pyc Binary files differnew file mode 100644 index 0000000..1223caf --- /dev/null +++ b/tests/__pycache__/conftest.cpython-310-pytest-7.1.3.pyc diff --git a/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc b/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc Binary files differindex 31b7705..cebda28 100644 --- a/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc +++ b/tests/__pycache__/test_brute_force.cpython-310-pytest-7.1.3.pyc diff --git a/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc b/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc Binary files differindex e98e401..1bcf167 100644 --- a/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc +++ b/tests/__pycache__/test_edges.cpython-310-pytest-7.1.3.pyc diff --git a/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc b/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc Binary files differindex 65c8050..9a323e0 100644 --- a/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc +++ b/tests/__pycache__/test_settings.cpython-310-pytest-7.1.3.pyc diff --git a/tests/base.py b/tests/base.py index 0f69e67..0cf8d36 100644 --- a/tests/base.py +++ b/tests/base.py @@ -1,5 +1,6 @@ import functools import logging +import os import unittest from chirp import chirp_common @@ -15,6 +16,17 @@ class DriverTest(unittest.TestCase): def setUp(self): super().setUp() + self.patches = [] + + if ('CHIRP_TEST_BITWISE_STRICT_BYTES' in os.environ and + not self.RADIO_CLASS.NEEDS_COMPAT_SERIAL): + self.use_patch(unittest.mock.patch( + 'chirp.bitwise.DataElement._compat_bytes', + side_effect=self._strict_bytes)) + self.use_patch(unittest.mock.patch( + 'chirp.bitwise.string_straight_encode', + side_effect=AssertionError( + 'string_straight_encode not allowed in strict mode'))) self.parent = self.RADIO_CLASS(self.TEST_IMAGE) self.parent_rf = self.parent.get_features() @@ -27,7 +39,6 @@ class DriverTest(unittest.TestCase): else: self.radio = self.parent self.rf = self.parent_rf - self.patches = [] def use_patch(self, patch): self.patches.append(patch) @@ -37,17 +48,18 @@ class DriverTest(unittest.TestCase): for patch in self.patches: patch.stop() + def _strict_bytes(self, bs, asbytes): + """Enforce strict get_raw() behavior returning bytes()""" + assert asbytes, 'asbytes must be True in strict mode' + assert isinstance(bs, bytes), 'Type should be bytes here' + return bs + def get_mem(self): """Attempt to build a suitable memory for testing""" # Check to see if memory #1 has immutable fields, and if so, # use that as our template instead of constructing a memory ourselves try: m = self.radio.get_memory(1) - # Don't return extra because it will never match properly - try: - del m.extra - except AttributeError: - pass # Pre-filter the name so it will match what we expect back if 'name' not in m.immutable: m.name = self.radio.filter_name(m.name) @@ -129,6 +141,8 @@ class DriverTest(unittest.TestCase): continue if k == "power": continue # FIXME + elif k == "extra": + continue elif k == "immutable": continue elif k == "name": @@ -180,6 +194,16 @@ class DriverTest(unittest.TestCase): self.assertEqual(a_vals, b_vals, 'Memories have unexpected differences') + # Consider mem.extra as matching if the structure remains the same. + # Since we don't know anything about model-specific things here we + # can't really assert any more than that, but we can ensure that the + # structure doesn't change due to the contents of the rest of the + # memory. + if a.extra and b.extra: + self.assertEqual([x.get_name() for x in a.extra], + [x.get_name() for x in b.extra], + 'Memories have different mem.extra keys') + def requires_feature(flag): def inner(fn): diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..8026a98 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,15 @@ +import os + +import pytest + + +def pytest_collection_modifyitems(config, items): + xfails = os.path.join(os.path.dirname(__file__), 'xfails.txt') + with open(xfails) as f: + lines = [x.strip() for x in f.readlines() if not x.startswith('#')] + msg = ('Test marked for XFAIL in tests/xfails.txt, but did not fail. ' + 'If this test is now fixed, remove it from the file.') + for item in items: + if item.nodeid in lines: + mark = pytest.mark.xfail(reason=msg) + item.add_marker(mark) diff --git a/tests/images/BTECH_UV-2501+220.img b/tests/images/BTECH_UV-2501+220.img Binary files differindex 8bf021c..8bf021c 100755..100644 --- a/tests/images/BTECH_UV-2501+220.img +++ b/tests/images/BTECH_UV-2501+220.img diff --git a/tests/images/BTECH_UV-25X2.img b/tests/images/BTECH_UV-25X2.img Binary files differindex aec97d8..aec97d8 100755..100644 --- a/tests/images/BTECH_UV-25X2.img +++ b/tests/images/BTECH_UV-25X2.img diff --git a/tests/images/BTECH_UV-25X4.img b/tests/images/BTECH_UV-25X4.img Binary files differindex 12ce9f9..12ce9f9 100755..100644 --- a/tests/images/BTECH_UV-25X4.img +++ b/tests/images/BTECH_UV-25X4.img diff --git a/tests/images/BTECH_UV-5001.img b/tests/images/BTECH_UV-5001.img Binary files differindex 377be8b..377be8b 100755..100644 --- a/tests/images/BTECH_UV-5001.img +++ b/tests/images/BTECH_UV-5001.img diff --git a/tests/images/BTECH_UV-50X2.img b/tests/images/BTECH_UV-50X2.img Binary files differindex 6bac4fb..6bac4fb 100755..100644 --- a/tests/images/BTECH_UV-50X2.img +++ b/tests/images/BTECH_UV-50X2.img diff --git a/tests/images/BTECH_UV-5X3.img b/tests/images/BTECH_UV-5X3.img Binary files differindex aa6ad8a..aa6ad8a 100755..100644 --- a/tests/images/BTECH_UV-5X3.img +++ b/tests/images/BTECH_UV-5X3.img diff --git a/tests/images/Baofeng_5RM.img b/tests/images/Baofeng_5RM.img Binary files differnew file mode 100644 index 0000000..8cff8e8 --- /dev/null +++ b/tests/images/Baofeng_5RM.img diff --git a/tests/images/Baofeng_5RX.img b/tests/images/Baofeng_5RX.img Binary files differnew file mode 100644 index 0000000..c2a604f --- /dev/null +++ b/tests/images/Baofeng_5RX.img diff --git a/tests/images/Baofeng_BF-T20.img b/tests/images/Baofeng_BF-T20.img Binary files differnew file mode 100644 index 0000000..aeb1a02 --- /dev/null +++ b/tests/images/Baofeng_BF-T20.img diff --git a/tests/images/Baofeng_BF-T20FRS.img b/tests/images/Baofeng_BF-T20FRS.img Binary files differnew file mode 100644 index 0000000..5859da0 --- /dev/null +++ b/tests/images/Baofeng_BF-T20FRS.img diff --git a/tests/images/Baofeng_UV-17.img b/tests/images/Baofeng_UV-17.img Binary files differnew file mode 100644 index 0000000..220f797 --- /dev/null +++ b/tests/images/Baofeng_UV-17.img diff --git a/tests/images/Baofeng_UV-17Pro.img b/tests/images/Baofeng_UV-17Pro.img Binary files differnew file mode 100644 index 0000000..69a3735 --- /dev/null +++ b/tests/images/Baofeng_UV-17Pro.img diff --git a/tests/images/Baofeng_UV-17ProGPS.img b/tests/images/Baofeng_UV-17ProGPS.img Binary files differnew file mode 100644 index 0000000..e3ded1f --- /dev/null +++ b/tests/images/Baofeng_UV-17ProGPS.img diff --git a/tests/images/Baofeng_UV-6R.img b/tests/images/Baofeng_UV-6R.img Binary files differindex 32f5c15..32f5c15 100755..100644 --- a/tests/images/Baofeng_UV-6R.img +++ b/tests/images/Baofeng_UV-6R.img diff --git a/tests/images/Feidaxin_FD-268A.img b/tests/images/Feidaxin_FD-268A.img Binary files differindex 52fc11b..52fc11b 100755..100644 --- a/tests/images/Feidaxin_FD-268A.img +++ b/tests/images/Feidaxin_FD-268A.img diff --git a/tests/images/Feidaxin_FD-268B.img b/tests/images/Feidaxin_FD-268B.img Binary files differindex 8de4949..8de4949 100755..100644 --- a/tests/images/Feidaxin_FD-268B.img +++ b/tests/images/Feidaxin_FD-268B.img diff --git a/tests/images/Feidaxin_FD-288B.img b/tests/images/Feidaxin_FD-288B.img Binary files differindex 778ff91..778ff91 100755..100644 --- a/tests/images/Feidaxin_FD-288B.img +++ b/tests/images/Feidaxin_FD-288B.img diff --git a/tests/images/Icom_IC-P7.img b/tests/images/Icom_IC-P7.img Binary files differindex 35a0966..35a0966 100755..100644 --- a/tests/images/Icom_IC-P7.img +++ b/tests/images/Icom_IC-P7.img diff --git a/tests/images/Icom_IC-V80.img b/tests/images/Icom_IC-V80.img Binary files differindex 49af6b5..49af6b5 100755..100644 --- a/tests/images/Icom_IC-V80.img +++ b/tests/images/Icom_IC-V80.img diff --git a/tests/images/Icom_ID-51_Plus.img b/tests/images/Icom_ID-51_Plus.img Binary files differindex 07bdc7e..07bdc7e 100755..100644 --- a/tests/images/Icom_ID-51_Plus.img +++ b/tests/images/Icom_ID-51_Plus.img diff --git a/tests/images/Icom_ID-80H.img b/tests/images/Icom_ID-80H.img Binary files differindex 1c14d84..1c14d84 100755..100644 --- a/tests/images/Icom_ID-80H.img +++ b/tests/images/Icom_ID-80H.img diff --git a/tests/images/KYD_IP-620.img b/tests/images/KYD_IP-620.img Binary files differindex c088dfe..c088dfe 100755..100644 --- a/tests/images/KYD_IP-620.img +++ b/tests/images/KYD_IP-620.img diff --git a/tests/images/KYD_NC-630A.img b/tests/images/KYD_NC-630A.img Binary files differindex 2c627fa..2c627fa 100755..100644 --- a/tests/images/KYD_NC-630A.img +++ b/tests/images/KYD_NC-630A.img diff --git a/tests/images/Kenwood_TH-D74_clone_mode.img b/tests/images/Kenwood_TH-D74_clone_mode.img Binary files differindex 5b1e40a..5b1e40a 100755..100644 --- a/tests/images/Kenwood_TH-D74_clone_mode.img +++ b/tests/images/Kenwood_TH-D74_clone_mode.img diff --git a/tests/images/Kenwood_TK-272G.img b/tests/images/Kenwood_TK-272G.img Binary files differindex bdeed1f..bdeed1f 100755..100644 --- a/tests/images/Kenwood_TK-272G.img +++ b/tests/images/Kenwood_TK-272G.img diff --git a/tests/images/Kenwood_TK-760G.img b/tests/images/Kenwood_TK-760G.img Binary files differindex 23c883a..23c883a 100755..100644 --- a/tests/images/Kenwood_TK-760G.img +++ b/tests/images/Kenwood_TK-760G.img diff --git a/tests/images/LUITON_LT-725UV.img b/tests/images/LUITON_LT-725UV.img Binary files differindex 537e13b..537e13b 100755..100644 --- a/tests/images/LUITON_LT-725UV.img +++ b/tests/images/LUITON_LT-725UV.img diff --git a/tests/images/Leixen_VV-898S.img b/tests/images/Leixen_VV-898S.img Binary files differindex 10a264a..10a264a 100755..100644 --- a/tests/images/Leixen_VV-898S.img +++ b/tests/images/Leixen_VV-898S.img diff --git a/tests/images/MMLradio_JC-8629.img b/tests/images/MMLradio_JC-8629.img Binary files differnew file mode 100644 index 0000000..05e84a1 --- /dev/null +++ b/tests/images/MMLradio_JC-8629.img diff --git a/tests/images/QYT_KT7900D.img b/tests/images/QYT_KT7900D.img Binary files differindex 73bfc37..73bfc37 100755..100644 --- a/tests/images/QYT_KT7900D.img +++ b/tests/images/QYT_KT7900D.img diff --git a/tests/images/QYT_KT8900D.img b/tests/images/QYT_KT8900D.img Binary files differindex e31310f..e31310f 100755..100644 --- a/tests/images/QYT_KT8900D.img +++ b/tests/images/QYT_KT8900D.img diff --git a/tests/images/Radtel_RT-490.img b/tests/images/Radtel_RT-490.img Binary files differnew file mode 100644 index 0000000..b992ee8 --- /dev/null +++ b/tests/images/Radtel_RT-490.img diff --git a/tests/images/Radtel_T18.img b/tests/images/Radtel_T18.img Binary files differindex f508675..f508675 100755..100644 --- a/tests/images/Radtel_T18.img +++ b/tests/images/Radtel_T18.img diff --git a/tests/images/Retevis_RA79.img b/tests/images/Retevis_RA79.img Binary files differnew file mode 100644 index 0000000..41cc21a --- /dev/null +++ b/tests/images/Retevis_RA79.img diff --git a/tests/images/Retevis_RA89.img b/tests/images/Retevis_RA89.img Binary files differnew file mode 100644 index 0000000..a33e97f --- /dev/null +++ b/tests/images/Retevis_RA89.img diff --git a/tests/images/Retevis_RT23.img b/tests/images/Retevis_RT23.img Binary files differindex 2bb0252..2bb0252 100755..100644 --- a/tests/images/Retevis_RT23.img +++ b/tests/images/Retevis_RT23.img diff --git a/tests/images/TDXone_TD-Q8A.img b/tests/images/TDXone_TD-Q8A.img Binary files differindex 6bd3d07..6bd3d07 100755..100644 --- a/tests/images/TDXone_TD-Q8A.img +++ b/tests/images/TDXone_TD-Q8A.img diff --git a/tests/images/TIDRADIO_TD-H3.img b/tests/images/TIDRADIO_TD-H3.img Binary files differnew file mode 100644 index 0000000..e891793 --- /dev/null +++ b/tests/images/TIDRADIO_TD-H3.img diff --git a/tests/images/TYT_TH-UV3R-25.img b/tests/images/TYT_TH-UV3R-25.img Binary files differindex d62a459..d62a459 100755..100644 --- a/tests/images/TYT_TH-UV3R-25.img +++ b/tests/images/TYT_TH-UV3R-25.img diff --git a/tests/images/WACCOM_MINI-8900.img b/tests/images/WACCOM_MINI-8900.img Binary files differindex 9b5737a..9b5737a 100755..100644 --- a/tests/images/WACCOM_MINI-8900.img +++ b/tests/images/WACCOM_MINI-8900.img diff --git a/tests/images/Yaesu_FT-2900R_1900R.img b/tests/images/Yaesu_FT-2900R_1900R.img Binary files differindex ef17a61..ef17a61 100755..100644 --- a/tests/images/Yaesu_FT-2900R_1900R.img +++ b/tests/images/Yaesu_FT-2900R_1900R.img diff --git a/tests/images/Yaesu_FT-450.img b/tests/images/Yaesu_FT-450.img Binary files differnew file mode 100644 index 0000000..7b179c0 --- /dev/null +++ b/tests/images/Yaesu_FT-450.img diff --git a/tests/images/Yaesu_FT-50.img b/tests/images/Yaesu_FT-50.img Binary files differindex 77cffd7..77cffd7 100755..100644 --- a/tests/images/Yaesu_FT-50.img +++ b/tests/images/Yaesu_FT-50.img diff --git a/tests/images/Yaesu_FTM-7250D_R.img b/tests/images/Yaesu_FTM-7250D_R.img Binary files differindex 2ec6832..2ec6832 100755..100644 --- a/tests/images/Yaesu_FTM-7250D_R.img +++ b/tests/images/Yaesu_FTM-7250D_R.img diff --git a/tests/py3_driver_testers.txt b/tests/py3_driver_testers.txt index ceaf190..59f2bb9 100644 --- a/tests/py3_driver_testers.txt +++ b/tests/py3_driver_testers.txt @@ -11,6 +11,7 @@ Abbree_AR-518,@KC9HI,16-Dec-2022 Abbree_AR-63,@KC9HI,30-Nov-2022 Abbree_AR-730,@KC9HI,17-Aug-2023 +Abbree_AR-869,+Radtel_RT-490,11-Nov-2023 Abbree_AR-F5,@KC9HI,09-Aug-2023 Alinco_DJ175,+Alinco_DR235T,12-Dec-2022 Alinco_DJ596,+Alinco_DR235T,12-Dec-2022 @@ -50,6 +51,8 @@ BTECH_UV-50X2,@KC9HI,11-Nov-2022 BTECH_UV-50X2_G2,@KC9HI,30-Nov-2022 BTECH_UV-50X3,@KC9HI,10-Dec-2022 BTECH_UV-5X3,@KC9HI,9-Dec-2022 +Baofeng_5RM,@vdwel,7-Dec-2023 +Baofeng_5RX,@KC9HI,16-Jan-2024 Baofeng_BF-1901,@cetinajero,3-Jul-2023 Baofeng_BF-1904,@cetinajero,3-Jul-2023 Baofeng_BF-888,@kk7ds,13-Feb-2019 @@ -58,6 +61,8 @@ Baofeng_BF-A58S,@KC9HI,3-Dec-2022 Baofeng_BF-F8HP,@KC9HI,18-Nov-2022 Baofeng_BF-M4,@cetinajero,8-May-2023 Baofeng_BF-T1,@KC9HI,10-Dec-2022 +Baofeng_BF-T20,@KC9HI,15-Dec-2023 +Baofeng_BF-T20FRS,@KC9HI,17-Dec-2023 Baofeng_BF-T8,@KC9HI,30-Nov-2022 Baofeng_BF-V8A,@KC9HI,28-Nov-2022 Baofeng_F-11,+Baofeng_UV-5R,18-Nov-2022 @@ -72,16 +77,21 @@ Baofeng_UV-82HP,@KC9HI,18-Nov-2022 Baofeng_UV-82WP,@KC9HI,3-Dec-2022 Baofeng_UV-9G,@KC9HI,3-Dec-2022 Baofeng_UV-9R,@KC9HI,3-Dec-2022 +Baofeng_UV-17,@vdwel,27-Nov-2023 +Baofeng_UV-17Pro,@vdwel,27-Nov-2023 +Baofeng_UV-17ProGPS,@vdwel,27-Nov-2023 Baofeng_UV-B5,@KC9HI,18-Nov-2022 Baofeng_UV-S9X3,@KC9HI,22-Aug-2023 Baofeng_W31E,@KC9HI,14-Aug-2023 Baojie_BJ-218,+LUITON_LT-725UV,16-Feb-2023 Baojie_BJ-318,@KC9HI,2-Jan-2023 +Boristone_8RS,+Radtel_RT-490,11-Nov-2023 Cignus_XTR-5,+Radioddity_GS-5B,17-Mar-2023 CRT_Micron_UV,+Retevis_RT95,13-Nov-2022 CRT_Micron_UV_V2,+Retevis_RT95,13-Nov-2022 Explorer_QRZ-1,+TYT_TH-UV88,5-Dec-2022 Generic_CSV,@kk7ds,4-Dec-2022 +HamGeek_HG-590,+Radtel_RT-490,11-Nov-2023 Hiroyasu_HI-8811,@KC9HI,4-Jun-2023 HobbyPCB_RS-UV3,@kk7ds,9-Dec-2022 Icom_IC-208H,*icf,12-Dec-2022 @@ -125,6 +135,8 @@ Intek_HR-2040,+AnyTone_5888UV,9-Dec-2022 Jetstream_JT220M,+Alinco_DR235T,12-Dec-2022 Jetstream_JT270M,+Jetstream_JT270M,13-Dec-2022 Jetstream_JT270MH,@kk7ds,13-Dec-2022 +Jianpai_8800_Plus,+Radtel_RT-490,11-Nov-2023 +JJCC_JC-8629,+Radtel_RT-490,11-Nov-2023 Kenwood_HMK,+Generic_CSV,4-Dec-2022 Kenwood_TH-D7,*kenwood_live,12-Dec-2022 Kenwood_TH-D7G,*kenwood_live,12-Dec-2022 @@ -196,6 +208,7 @@ LUITON_LT-588UV,@KC9HI,11-Nov-2022 LUITON_LT-725UV,@KC9HI,11-Dec-2022 Maverick_RA-100,@cetinajero,7-Jul-2023 Maverick_RA-425,@cetinajero,7-Jul-2023 +MMLradio_JC-8629,@KC9HI,11-Nov-2023 MTC_UV-5R-3,+BTECH_UV-5X3,9-Dec-2022 Midland_DBR2500,+Retevis_RT95,13-Nov-2022 Polmar_DB-50M,+AnyTone_5888UV,9-Dec-2022 @@ -225,11 +238,14 @@ Radioddity_UV-82X3,@KC9HI,18-Nov-2022 Radtel_RT-470,@KC9HI,2-Apr-2023 Radtel_RT-470L,@KC9HI,5-May-2023 Radtel_RT-470X,@KC9HI,10-Aug-2023 +Radtel_RT-490,@KC9HI,11-Nov-2023 Radtel_T18,@KC9HI,28-Nov-2022 Retevis_H777S,@KC9HI,22-Dec-2022 Retevis_H777_Plus,@KC9HI,4-Dec-2022 Retevis_RA685,@KC9HI,19-Nov-2022 +Retevis_RA79,@KC9HI,27-Oct-2023 Retevis_RA85,@KC9HI,19-Nov-2022 +Retevis_RA89,@KC9HI,23-Nov-2023 Retevis_RB15,@KC9HI,18-Dec-2022 Retevis_RB17,@KC9HI,28-Nov-2022 Retevis_RB17A,@KC9HI,30-Nov-2022 @@ -296,6 +312,8 @@ Retevis_RT9000D_400-490,@KC9HI,8-Dec-2022 Retevis_RT9000D_66-88,@KC9HI,8-Dec-2022 Ruyage_UV58Plus,@KC9HI,18-Mar-2023 SenhaiX_8800,+Radioddity_GS-5B,17-Mar-2023 +Socotran_FB-8629,+Radtel_RT-490,11-Nov-2023 +Socotran_JC-8629,+Radtel_RT-490,11-Nov-2023 Talkpod_A36plus,@KC9HI,12-Jun-2023 TDXone_TD-Q8A,@KC9HI,18-Dec-2022 TIDRADIO_TD-H6,@kk7ds,21-Oct-2022 @@ -304,6 +322,9 @@ TIDRADIO_TD-H8-GMRS,@Sandmann34,7-Feb-2023 TIDRADIO_TD-H8-HAM,@Sandmann34,7-Feb-2023 TID_TD-M8,+Retevis_RT22,9-Dec-2022 TID_TD-UV68,@Sandmann34,7-Feb-2023 +TIDRADIO_TD-H3,@songjunbiao,1-Dec-2023 +TIDRADIO_TD-H3-GMRS,@songjunbiao,1-Dec-2023 +TIDRADIO_TD-H3-HAM,@songjunbiao,1-Dec-2023 TYT_TH-UVF1,@kk7ds,13-Dec-2022 TYT_TH-UVF8D,@MELERIX,2-Feb-2023 TYT_TH-UV8000,@KC9HI,6-Jan-2023 @@ -342,6 +363,7 @@ Yaesu_FT-1D_R,+Yaesu_FT3D_R,30-Dec-2022 Yaesu_FT2D_R,+Yaesu_FT3D_R,30-Dec-2022 Yaesu_FT2D_Rv2,+Yaesu_FT3D_R,30-Dec-2022 Yaesu_FT3D_R,@kk7ds,30-Dec-2022 +Yaesu_FT-450,@WCurlew,03-Nov-2023 Yaesu_FT-450D,@Old-Phart,01-Jun-2023 Yaesu_FT-4XE,Unit tested; needs confirm,24-Dec-2022 Yaesu_FT-4XR,+Yaesu_FT-4XE,24-Dec-2022 diff --git a/tests/test_brute_force.py b/tests/test_brute_force.py index 236e11a..0ab09f7 100644 --- a/tests/test_brute_force.py +++ b/tests/test_brute_force.py @@ -1,4 +1,3 @@ -import copy import logging from chirp import chirp_common @@ -158,7 +157,7 @@ class TestCaseBruteForce(base.DriverTest): for mode in self.rf.valid_modes: self.assertIn(mode, chirp_common.MODES, 'Radio exposes non-standard mode') - tmp = copy.deepcopy(m) + tmp = m.dupe() if mode == "DV" and \ isinstance(self.radio, chirp_common.IcomDstarSupport): diff --git a/tests/test_edges.py b/tests/test_edges.py index e515330..2280819 100644 --- a/tests/test_edges.py +++ b/tests/test_edges.py @@ -1,3 +1,7 @@ +import pytest +from unittest import mock + +from chirp import bitwise from chirp import chirp_common from chirp import errors from tests import base @@ -106,12 +110,21 @@ class TestCaseEdges(base.DriverTest): lo, hi = self.rf.memory_bounds for name in self.rf.valid_special_chans: m1 = self.radio.get_memory(name) + # Flip to non-empty, but only touch it if it's false because some + # radios have empty in the immutable set. + if m1.empty: + m1.empty = False try: del m1.extra except AttributeError: pass if m1.freq > 130000000 and m1.freq < 500000000: m1.freq += 5000 + elif m1.freq == 0: + # If the memory was empty before, we likely need to pick + # a valid frequency. Use the bottom of the first supported + # band. + m1.freq = self.rf.valid_bands[0][0] try: self.radio.set_memory(m1) except errors.RadioError: @@ -154,3 +167,23 @@ class TestCaseEdges(base.DriverTest): self.assertEqual(m2.name.rstrip(), m2.name, 'Radio set and returned a memory with trailing ' 'whitespace in the name') + + +class TestBitwiseStrict(base.DriverTest): + def setUp(self): + pass + + def _raise(self, message): + raise SyntaxError(message) + + @pytest.mark.xfail(strict=False) + @mock.patch.object(bitwise.Processor, 'assert_negative_seek', + side_effect=_raise) + def test_bitwise_negative_seek(self, mock_assert): + super().setUp() + + @pytest.mark.xfail(strict=False) + @mock.patch.object(bitwise.Processor, 'assert_unnecessary_seek', + side_effect=_raise) + def test_bitwise_unnecessary_seek(self, mock_assert): + super().setUp() diff --git a/tests/test_settings.py b/tests/test_settings.py index 83b1db1..45267f0 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -1,3 +1,4 @@ +from chirp import chirp_common from chirp import settings from tests import base @@ -34,3 +35,26 @@ class TestCaseSettings(base.DriverTest): self.assertEqual(a.get_value(), b.get_value(), 'Setting value changed from %r to %r' % ( a.get_value(), b.get_value())) + + def test_memory_extra_frozen(self): + # Find the first non-empty memory and try to set it back as a + # FrozenMemory to make sure the driver does not try to modify + # any of the settings. + for i in range(*self.rf.memory_bounds): + m = self.radio.get_memory(i) + if not m.empty: + self.radio.set_memory(chirp_common.FrozenMemory(m)) + break + + def test_memory_extra_flat(self): + for i in range(*self.rf.memory_bounds): + m = self.radio.get_memory(i) + if not m.empty: + self.assertIsInstance( + m.extra, + (list, settings.RadioSettingGroup), + 'mem.extra must be a list or RadioSettingGroup') + for e in m.extra: + self.assertIsInstance( + e, settings.RadioSetting, + 'mem.extra items must be RadioSetting objects') diff --git a/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc b/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc Binary files differindex 5066d3a..398ad6b 100644 --- a/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc +++ b/tests/unit/__pycache__/test_bitwise.cpython-310-pytest-7.1.3.pyc diff --git a/tests/unit/__pycache__/test_chirp_common.cpython-310-pytest-7.1.3.pyc b/tests/unit/__pycache__/test_chirp_common.cpython-310-pytest-7.1.3.pyc Binary files differindex cd2beb0..3334195 100644 --- a/tests/unit/__pycache__/test_chirp_common.cpython-310-pytest-7.1.3.pyc +++ b/tests/unit/__pycache__/test_chirp_common.cpython-310-pytest-7.1.3.pyc diff --git a/tests/unit/__pycache__/test_wxui_radiothread.cpython-310-pytest-7.1.3.pyc b/tests/unit/__pycache__/test_wxui_radiothread.cpython-310-pytest-7.1.3.pyc Binary files differindex bee4b94..1c758c2 100644 --- a/tests/unit/__pycache__/test_wxui_radiothread.cpython-310-pytest-7.1.3.pyc +++ b/tests/unit/__pycache__/test_wxui_radiothread.cpython-310-pytest-7.1.3.pyc diff --git a/tests/unit/test_bitwise.py b/tests/unit/test_bitwise.py index 969622f..f150886 100644 --- a/tests/unit/test_bitwise.py +++ b/tests/unit/test_bitwise.py @@ -251,8 +251,8 @@ class TestBitwiseCharTypes(BaseTest): def test_string_get_raw(self): data = memmap.MemoryMapBytes(bytes(b"foobar")) obj = bitwise.parse("char foo[6];", data) - self.assertEqual('foobar', obj.foo.get_raw()) - self.assertEqual(b'foobar', obj.foo.get_raw(asbytes=True)) + self.assertEqual(b'foobar', obj.foo.get_raw()) + self.assertEqual('foobar', obj.foo.get_raw(asbytes=False)) class TestBitwiseStructTypes(BaseTest): @@ -283,15 +283,24 @@ class TestBitwiseStructTypes(BaseTest): data = memmap.MemoryMapBytes(bytes(b"..")) defn = "struct { u8 bar; u8 baz; } foo;" obj = bitwise.parse(defn, data) - self.assertEqual('..', obj.get_raw()) - self.assertEqual(b'..', obj.get_raw(asbytes=True)) + self.assertEqual(b'..', obj.get_raw()) + self.assertEqual('..', obj.get_raw(asbytes=False)) def test_struct_get_raw_small(self): data = memmap.MemoryMapBytes(bytes(b".")) defn = "struct { u8 bar; } foo;" obj = bitwise.parse(defn, data) - self.assertEqual('.', obj.get_raw()) - self.assertEqual(b'.', obj.get_raw(asbytes=True)) + self.assertEqual(b'.', obj.get_raw()) + self.assertEqual('.', obj.get_raw(asbytes=False)) + + def test_struct_set_raw(self): + data = memmap.MemoryMapBytes(bytes(b".")) + defn = "struct { u8 bar; } foo;" + obj = bitwise.parse(defn, data) + obj.set_raw(b'1') + self.assertEqual(b'1', data.get_packed()) + obj.set_raw('2') + self.assertEqual(b'2', data.get_packed()) class TestBitwiseSeek(BaseTest): diff --git a/tests/unit/test_chirp_common.py b/tests/unit/test_chirp_common.py index 30da2c7..fb880c9 100644 --- a/tests/unit/test_chirp_common.py +++ b/tests/unit/test_chirp_common.py @@ -821,6 +821,15 @@ class TestMemory(base.BaseTest): self.assertNotIsInstance(m, FrozenMemory) self.assertFalse(hasattr(m, '_frozen')) + def test_frozen_modifications(self): + orig = chirp_common.Memory(123) + orig.extra = [settings.RadioSetting( + 'foo', 'Foo', + settings.RadioSettingValueBoolean(False))] + frozen = chirp_common.FrozenMemory(orig) + with self.assertRaises(ValueError): + frozen.extra[0].value = True + def test_tone_validator(self): m = chirp_common.Memory() # 100.0 is a valid tone @@ -843,6 +852,81 @@ class TestMemory(base.BaseTest): with self.assertRaises(ValueError): m.ctone = 300.0 + def test_repr_dump(self): + m = chirp_common.Memory() + self.assertEqual( + "<Memory 0: freq=0,name='',vfo=0,rtone=88.5,ctone=88.5,dtcs=23," + "rx_dtcs=23,tmode='',cross_mode='Tone->Tone',dtcs_polarity='NN'," + "skip='',power=None,duplex='',offset=600000,mode='FM'," + "tuning_step=5.0,comment='',empty=False,immutable=[]>", repr(m)) + + m.freq = 146520000 + m.rtone = 107.2 + m.tmode = 'Tone' + self.assertEqual( + "<Memory 0: freq=146520000,name='',vfo=0,rtone=107.2,ctone=88.5," + "dtcs=23,rx_dtcs=23,tmode='Tone',cross_mode='Tone->Tone'," + "dtcs_polarity='NN',skip='',power=None,duplex='',offset=600000," + "mode='FM',tuning_step=5.0,comment='',empty=False,immutable=[]>", + repr(m)) + + m.number = 101 + m.extd_number = 'Call' + self.assertEqual( + "<Memory Call(101): freq=146520000,name='',vfo=0,rtone=107.2," + "ctone=88.5,dtcs=23,rx_dtcs=23,tmode='Tone'," + "cross_mode='Tone->Tone',dtcs_polarity='NN',skip='',power=None," + "duplex='',offset=600000,mode='FM',tuning_step=5.0,comment=''," + "empty=False,immutable=[]>", repr(m)) + + m.extra = settings.RadioSettingGroup('extra', 'Extra') + m.extra.append( + settings.RadioSetting('test1', 'Test Setting 1', + settings.RadioSettingValueBoolean(False))) + m.extra.append( + settings.RadioSetting('test2', 'Test Setting 2', + settings.RadioSettingValueList( + ['foo', 'bar'], 'foo'))) + self.assertEqual( + "<Memory Call(101): freq=146520000,name='',vfo=0,rtone=107.2," + "ctone=88.5,dtcs=23,rx_dtcs=23,tmode='Tone'," + "cross_mode='Tone->Tone',dtcs_polarity='NN',skip='',power=None," + "duplex='',offset=600000,mode='FM',tuning_step=5.0,comment=''," + "empty=False,immutable=[],extra.test1='False',extra.test2='foo'>", + repr(m)) + + def test_debug_diff(self): + m1 = chirp_common.Memory(1) + m2 = chirp_common.Memory(1) + + m1.freq = 146520000 + m2.freq = 446000000 + self.assertEqual('freq=146520000>446000000', m1.debug_diff(m2, '>')) + + m2.tmode = 'TSQL' + self.assertEqual("freq=146520000/446000000,tmode=''/'TSQL'", + m1.debug_diff(m2)) + + # Make sure ident diffs come first and are noticed + m2.number = 2 + m2.freq = 146520000 + self.assertEqual("ident=1/2,tmode=''/'TSQL'", m1.debug_diff(m2)) + + # Make sure we can diff extras, and amongst heterogeneous formats + m2.number = 1 + m1.extra = settings.RadioSettingGroup('extra', 'Extra') + m2.extra = settings.RadioSettingGroup('extra', 'Extra') + m1.extra.append( + settings.RadioSetting('test1', 'Test Setting 1', + settings.RadioSettingValueBoolean(False))) + m2.extra.append( + settings.RadioSetting('test2', 'Test Setting 2', + settings.RadioSettingValueList( + ['foo', 'bar'], 'foo'))) + self.assertEqual( + "extra.test1='False'/'<missing>',extra.test2='<missing>'/'foo'," + "tmode=''/'TSQL'", m1.debug_diff(m2)) + class TestRadioFeatures(base.BaseTest): def test_valid_tones(self): diff --git a/tests/unit/test_wxui_radiothread.py b/tests/unit/test_wxui_radiothread.py index 99f9438..1088b81 100644 --- a/tests/unit/test_wxui_radiothread.py +++ b/tests/unit/test_wxui_radiothread.py @@ -3,10 +3,17 @@ import time from unittest import mock sys.modules['wx'] = wx = mock.MagicMock() +sys.modules['wx.lib'] = mock.MagicMock() +sys.modules['wx.lib.scrolledpanel'] = mock.MagicMock() +sys.modules['wx.lib.sized_controls'] = mock.MagicMock() +sys.modules['wx.richtext'] = mock.MagicMock() +wx.lib.newevent.NewCommandEvent.return_value = None, None +sys.modules['chirp.wxui.developer'] = mock.MagicMock() # These need to be imported after the above mock so that we don't require # wx to be present for these tests from tests.unit import base # noqa +from chirp.wxui import clone # noqa from chirp.wxui import radiothread # noqa @@ -105,3 +112,42 @@ class TestRadioThread(base.BaseTest): radio.set_memory.assert_not_called() radio.get_features.assert_not_called() wx.PostEvent.assert_not_called() + + +class TestClone(base.BaseTest): + @mock.patch('platform.system', return_value='Linux') + def test_sort_ports_unix(self, system): + ports = [ + mock.MagicMock(device='/dev/cu.zed', + description='My Zed'), + mock.MagicMock(device='/dev/cu.abc', + description='Some device'), + mock.MagicMock(device='/dev/cu.serial', + description='') + ] + self.assertEqual( + ['Some device (cu.abc)', + 'cu.serial', + 'My Zed (cu.zed)'], + [clone.port_label(p) + for p in sorted(ports, key=clone.port_sort_key)]) + + @mock.patch('platform.system', return_value='Windows') + def test_sort_ports_windows(self, system): + ports = [ + mock.MagicMock(device='COM7', + description='Some serial device'), + mock.MagicMock(device='COM17', + description='Some other device'), + mock.MagicMock(device='CNC0', + description='Some weird device'), + mock.MagicMock(device='COM4', + description=''), + ] + self.assertEqual( + ['CNC0: Some weird device', + 'COM4', + 'COM7: Some serial device', + 'COM17: Some other device'], + [clone.port_label(p) + for p in sorted(ports, key=clone.port_sort_key)]) diff --git a/tests/xfails.txt b/tests/xfails.txt new file mode 100644 index 0000000..0b53dbb --- /dev/null +++ b/tests/xfails.txt @@ -0,0 +1,8 @@ +# This is a list of tests that are expected to fail. DO NOT add new things to +# this file without careful consideration and discussion. This is not a tool +# to avoid fixing failures, it is purely a stop-gap to allow temporary +# failures to avoid breaking the build while iterating towards a fix. +# +# One line per test nodeid with a comment above citing a bug number, example: +# Bug #10931: FT-450 mem.extra fields cause UI corruption +# tests/test_drivers.py::TestCaseBruteForce_Yaesu_FT-450D::test_mode |
