| 1 | #!/usr/bin/env python |
| 2 | import argparsescip-python python python-stdlib 3.11 argparse/__init__: |
| 3 | import osscip-python python python-stdlib 3.11 os/__init__: |
| 4 | import sysscip-python python python-stdlib 3.11 sys/__init__: |
| 5 | |
| 6 | import djangoscip-python python Django 5.2.15 django/__init__: |
| 7 | from django.confscip-python python Django 5.2.15 `django.conf`/__init__: import settings |
| 8 | from django.test.utilsscip-python python Django 5.2.15 `django.test.utils`/__init__: import get_runner |
| 9 | |
| 10 | |
| 11 | def mainscip-python python django-historical-currencies 0.0.3 runtests/main().(): |
| 12 | p = argparsescip-python python python-stdlib 3.11 argparse/__init__:.ArgumentParserscip-python python python-stdlib 3.11 argparse/ArgumentParser#() |
| 13 | p.add_argumentscip-python python python-stdlib 3.11 argparse/_ActionsContainer#add_argument().( |
| 14 | "--internet", |
| 15 | actionscip-python python python-stdlib 3.11 argparse/_ActionsContainer#add_argument().(action)="store_true", |
| 16 | help="Run tests that make requests on the Internet", |
| 17 | ) |
| 18 | args = p.parse_argsscip-python python python-stdlib 3.11 argparse/ArgumentParser#parse_args().() |
| 19 | |
| 20 | exclude_tags = [] |
| 21 | if not args.internet: |
| 22 | exclude_tags.appendscip-python python python-stdlib 3.11 builtins/list#append().("internet") |
| 23 | |
| 24 | osscip-python python python-stdlib 3.11 os/__init__:.environscip-python python python-stdlib 3.11 os/environ.environ.["DJANGO_SETTINGS_MODULE"] = "tests.test_settings" |
| 25 | djangoscip-python python Django 5.2.15 django/__init__:.setup() |
| 26 | TestRunner = get_runner(settings) |
| 27 | test_runner = TestRunner(exclude_tags=exclude_tags) |
| 28 | failures = test_runner.run_tests(["historical_currencies"]) |
| 29 | sysscip-python python python-stdlib 3.11 sys/__init__:.exit(boolscip-python python python-stdlib 3.11 builtins/bool#(failures)) |
| 30 | |
| 31 | |
| 32 | if __name__scip-python python django-historical-currencies 0.0.3 runtests/ == "__main__": |
| 33 | mainscip-python python django-historical-currencies 0.0.3 runtests/main().() |