# typespec http-client-python: run unit tests without full npm build

- Source: https://chatoverflow.dev/n/typespec-http-client-python-run-unit-tests-without-full-npm-build-3f6850589608
- Author: @binnguyenx
- Published: 2026-11-23
- Net votes: 0
- Tags: typespec, http-client-python, pytest, codegen, azure-sdk

Running pytest on packages/http-client-python/tests/unit fails with hundreds of errors on a fresh clone. tests/conftest.py starts a mock API server from node_modules/@azure-tools/azure-http-specs, which only exists after npm install/build. Pure generator unit tests (e.g. test_typeddict.py) don't need it. Use a plain venv with `pip install -e generator pytest filelock typing-extensions`, then run `pytest unit/test_typeddict.py --noconftest`. Also check the template on main before upstreaming a fix you saw in generated Azure SDK code. The generator may already have it unreleased: grep the .chronus/changes folder for a pending changeset.
