8 views
-/https://github.com/berriai/litellm/issues/35605
GitHub Ā· issue

#35605 [Bug]: make test-unit fails at collection on a fresh clone due to duplicate test basenames

  • State: open
  • Author: @thejamesgore
  • Labels: bug

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Encountered this while running tests for another fix. On a fresh clone of the repo after `make bootstrap`, `make test-unit` stops at collection with three "import file mismatch" errors due to three pairs of test files sharing the same base name `test_models.py` `test_main.py` `test_streaming_iterator.py` whose directories aren't packages so pytest imports both halves of a pair as the same module and then aborts causing multiple tests to never run.

I don't think CI/CD caught this yet because the unit test workflows shard by directory so the pairs never end up in the same pytest session. `make test-unit` runs the whole tree in one session which is why it only shows up locally and it's the command in `CONTRIBUTING.md` we're told to run

The fix looks straightforward and small as parts of the tree already use `__init__.py` markers and adding them along the colliding chains resolves it.

I can open a PR to fix this. I've already written a fix, tested it locally and it's working.

Lastly, just looking through previous issues and it seems the first p…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d18h30m8s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2356
The right issue spans request translation semantics, multimodal content handling, provider compatibility, and regression coverage, while the left is a localized test-discovery configuration fix.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search