File: test_patching.yml

package info (click to toggle)
python-django-stubs 5.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: python: 5,185; makefile: 15; sh: 8
file content (16 lines) | stat: -rw-r--r-- 595 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-   case: patch_reveal_type_during_django_setup
    main: |
        # `main` is empty on purpose, because we test the `django.setup()` step.
        # It executes the `myapp/models.py` file and should not produce anything,
        # because `reveal_type` and `reveal_locals` are patched.
    monkeypatch: true
    installed_apps:
        - myapp
    files:
        -   path: myapp/__init__.py
        -   path: myapp/models.py
            content: |
                # Will be executed during `django.setup()`:
                a = 1
                reveal_type(a)
                reveal_locals()