Repository: yt-dlp
Issue: False test failure of download test for m3u8 format when first segment is small
Labels: bug,docs/meta/cleanup,core:downloader

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

This is a dev-related issue about improving unit tests.
Related discussion: https://github.com/yt-dlp/yt-dlp/pull/9776#discussion_r1610464390

During donwload tests, hls downloader only downloads first segments.
https://github.com/yt-dlp/yt-dlp/blob/78c57cc0e0998b8ed90e4306f410aa4be4115cd7/yt_dlp/downloader/hls.py#L270-L271
However, sometimes the first segment is small (<10kb), which results in false failures in download tester.
https://github.com/yt-dlp/yt-dlp/blob/f2816634e3be88fe158b342ee33918de3c272a54/test/test_download.py#L242-L249
Currently, there are many `'skip_download': 'm3u8'` in different extractors' testcases to circumvent this issue.
https://github.com/yt-dlp/yt-dlp/blob/f2816634e3be88fe158b342ee33918de3c272a54/yt_dlp/extractor/nebula.py#L140
This may be improved by changing downloader behavior when `test` is set, like
```diff
- fragments = [fragments[0] if fragments else None]
+ fragments = fragments[:self.params.get('test_download_frags', 2)] if fragments else None
```

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
Commenting out 'params': {'skip_download': 'm3u8'} in nebula.py, then run test command

> python test\test_download.py TestDownload.test_Nebula

[debug] Loaded 1811 extractors 
[nebula:video] Authorizing to Nebula 
[nebula:video] Extracting URL: https://nebula.tv/videos/that-time-disney-remade-beauty-and-the-beast 
[nebula:video] that-time-disney-remade-beauty-and-the-beast: Fetching video metadata 
[nebula:video] that-time-disney-remade-beauty-and-the-beast: Downloading m3u8 information 
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id 
[info] 84ed544d-4afd-4723-8cd5-2b95261f0abf: Downloading 1 format(s): 2508 
[info] Writing video metadata as JSON to: test_Nebula_84ed544d-4afd-4723-8cd5-2b95261f0abf.info.json 
[debug] Invoking hlsnative downloader on "https://starlight.nebula.tv/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTY1MDQ3MDN9.XQgKa1wGPrfMO6PSsj5eEIJWOTB1FbdS2vTCkcSHi2M/nebula-content/videos/lindsayellis/that-time-disney-remade-beauty-and-the-beast/video_upload:5603accc-90e2-49ea-b39f-be4fbe6e4831/video/avc1/1/media.m3u8"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 369 
[download] Destination: test_Nebula_84ed544d-4afd-4723-8cd5-2b95261f0abf.mp4 
[download] 100% of    756.00B in 00:00:00 at 1.25KiB/s
F
======================================================================
FAIL: test_Nebula (__main__.TestDownload):
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test\test_download.py", line 245, in test_template
    assertGreaterEqual(
  File "F:\cbasalt-github\yt-dlp\test\helper.py", line 302, in assertGreaterEqual
    self.assertTrue(got >= expected, msg)
AssertionError: False is not true : Expected test_Nebula_84ed544d-4afd-4723-8cd5-2b95261f0abf.mp4 to be at least 9.77KiB, but it's only 756.00B

----------------------------------------------------------------------
Ran 1 test in 5.792s

FAILED (failures=1)
```