diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml new file mode 100644 index 0000000..91e2faa --- /dev/null +++ b/.github/workflows/test-macos.yml @@ -0,0 +1,28 @@ +name: tests + +on: + pull_request: + branches: + - hauptzweig + +jobs: + run_tests: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + # Use "eager" update strategy in case cached dependencies are outdated + # Using regular install NOT editable install: see GH #3020 + pip install --upgrade --upgrade-strategy eager torch scikit-learn pytest + - name: Test with pytest + # Ensure we avoid adding current working directory to sys.path: + # - Use "pytest" over "python -m pytest" + # - Use "append" import mode rather than default "prepend" + run: > + pytest bug-121101.py diff --git a/bug-121101.py b/bug-121101.py new file mode 100644 index 0000000..25f14dd --- /dev/null +++ b/bug-121101.py @@ -0,0 +1,10 @@ +import time + +import torch +from sklearn.datasets import fetch_california_housing + + +def test_something(): + X, y = fetch_california_housing(return_X_y=True) + torch.tensor(X) + time.sleep(3)