Pin utf-8 in test_can_init_all_missing_weights source read (Windows non-UTF-8 locale fix) (#48819)
* Pin utf-8 when test_can_init_all_missing_weights reads model source
The test reads the model's config source file with a bare `open()`, which
uses the platform locale encoding. On Windows hosts with a non-UTF-8 default
code page (e.g. GBK on zh-CN systems), decoding fails for any model file
containing characters outside that code page — e.g.
`test_can_init_all_missing_weights` currently errors with
`UnicodeDecodeError: 'gbk' codec can't decode byte 0x94` for
nemotron_asr_streaming. Pin `encoding="utf-8"` to match the actual encoding
of the source files.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* Update tests/test_modeling_common.py
---------
Co-authored-by: dltsum <dltsum@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>