High probability I did this wrong but here's what I got. At least the giant original error message is gone
First attempt only with new twitch.py in Appdata\Roaming\streamlink\plugins
PS C:\Users\*user*> streamlink twitch.tv/primevideo best
[cli][info] Found matching plugin twitch for URL twitch.tv/primevideo
[plugins.twitch][error] no_cdm_specified
error: No playable streams found on this URL: twitch.tv/primevideo
Second attempt with both twitch.py and test_twitch.py in Appdata\Roaming\streamlink\plugins
PS C:\Users\*user*> streamlink twitch.tv/primevideo best
[session][error] Failed to load plugin test_twitch from C:\Users\*user*\AppData\Roaming\streamlink\plugins
Traceback (most recent call last):
File "C:\Users\*user*\AppData\Local\Programs\Streamlink\pkgs\streamlink\session.py", line 649, in load_plugins
mod = load_module(module_name, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\*user*\AppData\Local\Programs\Streamlink\pkgs\streamlink\utils\module.py", line 14, in load_module
spec.loader.exec_module(mod)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\*user*\AppData\Roaming\streamlink\plugins\test_twitch.py", line 6, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'
[cli][info] Found matching plugin twitch for URL twitch.tv/primevideo
[plugins.twitch][error] no_cdm_specified
error: No playable streams found on this URL: twitch.tv/primevideo