Skip to content

Commit f585bf2

Browse files
committed
[stubgenc] Add convenience script to run stubgenc test locally
1 parent ae72359 commit f585bf2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

misc/test-stugenc.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# This script is expected to be run from root of the mypy repo.
3+
# A convenience script to be run locally, matches .github/workflows/test_stubgenc.yml
4+
5+
# Install dependencies, demo project and mypy
6+
python -m pip install -r test-requirements.txt
7+
python -m pip install pybind11 numpy
8+
python -m pip install git+https://github.com/sizmailov/python_example.git@pybind11-mypy-demo
9+
python -m pip install .
10+
11+
# Remove expected stubs and generate new inplace
12+
rm -rf test-data/stubgen/python_example
13+
stubgen -p python_example -o test-data/stubgen/
14+
15+
# Compare generated stubs to expected ones
16+
git diff --exit-code test-data/stubgen/python_example

0 commit comments

Comments
 (0)