fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: add setup file to openapi-python

Lubos 0ffd8942 d2ebe4f7

+11 -277
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/class/default.py
··· 1 - class MyClass: 2 - pass
-10
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/class/with-decorators.py
··· 1 - def my_decorator(func): 2 - return func 3 - 4 - def another_decorator(func): 5 - return func 6 - 7 - @my_decorator 8 - @another_decorator 9 - class MyClass: 10 - pass
-4
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/class/with-docstring.py
··· 1 - class MyClass: 2 - """This is a class docstring""" 3 - 4 - pass
-5
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/class/with-extends.py
··· 1 - class BaseClass: 2 - pass 3 - 4 - class MyClass(BaseClass): 5 - pass
-5
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/class/with-method-docstring.py
··· 1 - class MyClass: 2 - def greet(): 3 - """Greets the user.""" 4 - 5 - pass
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/class/with-method.py
··· 1 - class MyClass: 2 - def foo(): 3 - return 42
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/function/default.py
··· 1 - def greet(): 2 - pass
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/function/with-annotations-defaults-return.py
··· 1 - def greet(name: str = "World", times: int = 1) -> None: 2 - for i in range(times): 3 - print("Hello, " + name)
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/function/with-body.py
··· 1 - def greet(name): 2 - print(name)
-10
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/function/with-decorators.py
··· 1 - def my_decorator(func): 2 - return func 3 - 4 - def another_decorator(func): 5 - return func 6 - 7 - @my_decorator 8 - @another_decorator 9 - def greet(): 10 - pass
-4
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/declarations/function/with-docstring.py
··· 1 - def greet(): 2 - """This function prints a greeting.""" 3 - 4 - print("Hello")
-5
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/await/inside-function.py
··· 1 - def fetchData(): 2 - pass 3 - 4 - async def main(): 5 - await fetchData()
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/binary/add.py
··· 1 - a = 42 2 - b = 84 3 - z = a + b
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/binary/subtract.py
··· 1 - a = 42 2 - b = 84 3 - z = a - b
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/call/call.py
··· 1 - print("hi")
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/dict/dict.py
··· 1 - async def foo(): 2 - items = {"key1": "value1", "key2": "value2"} 3 - {k: v async for (k, v) in items.items() if k % 2}
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/list/list.py
··· 1 - async def foo(): 2 - items = [1, 2, 3] 3 - evens = [x async for x in items if x % 2 == 0]
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/nested/dict-list.py
··· 1 - data = {"numbers": [1, 2, 3], "nestedDict": {"foo": "bar"}}
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/comprehensions/set/dict.py
··· 1 - async def foo(): 2 - items = [1, 2, 3] 3 - unique_evens = {x for x in items if x % 2}
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/dict/dict.py
··· 1 - person = {"name": "Alice", "age": 30}
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/fString/multiple-expressions.py
··· 1 - a = 1 2 - b = 2 3 - print(f"Sum: {a + b}")
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/fString/simple-interpolation.py
··· 1 - name = "Joe" 2 - print(f"Hello, {name}!")
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/generator/async.py
··· 1 - x_iter = [1, 2, 3] 2 - (x async for x in x_iter)
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/generator/simple.py
··· 1 - x_iter = [1, 2, 3] 2 - (x for x in x_iter)
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/generator/with-filter.py
··· 1 - x_iter = [1, 2, 3] 2 - (x for x in x_iter if x > 10)
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/identifier/identifier.py
··· 1 - y = 42 2 - x = y
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/lambda/simple.py
··· 1 - x = 5 2 - lambda : x + 1
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/lambda/with-params-and-default.py
··· 1 - lambda x, y = 10: x * y
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/list/list.py
··· 1 - nums = [1, 2, 3]
-4
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/literal/primitive.py
··· 1 - s = "hello" 2 - n = 123 3 - b = True 4 - none = None
-4
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/set/set.py
··· 1 - foo = "bar" 2 - emptySet = set() 3 - numberSet = {1, 2, 3} 4 - mixedSet = {"a", True, foo}
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/tuple/tuple.py
··· 1 - t = (1, 2, 3) 2 - single = (42,)
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/yield/default.py
··· 1 - def gen(): 2 - yield
-4
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/yield/from-iterable.py
··· 1 - iterable = [1, 2, 3] 2 - 3 - def gen(): 4 - yield from iterable
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/expressions/yield/with-value.py
··· 1 - def gen(): 2 - yield 42
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/assignment/primitive.py
··· 1 - foo = 42
-12
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/augmentedAssignment/arithmetic.py
··· 1 - x = 0 2 - y = 0 3 - z = 0 4 - a = 0 5 - b = 0 6 - c = 0 7 - x += 1 8 - y -= 2 9 - z *= 3 10 - a /= 4 11 - b //= 5 12 - c %= 6
-12
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/augmentedAssignment/bitwise.py
··· 1 - x = 1 2 - y = 1 3 - z = 1 4 - a = 1 5 - b = 1 6 - c = 1 7 - x **= 2 8 - y &= 1 9 - z |= 1 10 - a ^= 1 11 - b >>= 1 12 - c <<= 1
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/block/function.py
··· 1 - def main(): 2 - print("inside")
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/break/while.py
··· 1 - while True: 2 - break
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/continue/while.py
··· 1 - while True: 2 - continue
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/expression/simple.py
··· 1 - print("hello")
-5
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/for/for-else.py
··· 1 - items = [1, 2, 3] 2 - for x in items: 3 - pass 4 - else: 5 - print("done")
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/for/for.py
··· 1 - for i in range(3): 2 - print(i)
-5
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/if/if-else.py
··· 1 - x = 0 2 - if x > 0: 3 - print("positive") 4 - else: 5 - print("non-positive")
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/if/if.py
··· 1 - if True: 2 - print("positive")
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/import/from-with-alias.py
··· 1 - from os import environ as env
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/import/from-with-asterisk.py
··· 1 - from collections import *
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/import/from-with-name-alias.py
··· 1 - from os import path, environ as env
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/import/from-with-name.py
··· 1 - from sys import argv
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/import/module-with-alias.py
··· 1 - import json as js
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/import/module.py
··· 1 - import math 2 - import loads
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/raise/reraise.py
··· 1 - raise
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/raise/with-exception.py
··· 1 - raise ValueError("Invalid input")
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/return/function.py
··· 1 - def get_message(): 2 - return "hi"
-11
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/try/with-except-else-finally.py
··· 1 - def dangerous_func(): 2 - pass 3 - 4 - try: 5 - dangerous_func() 6 - except Exception as e: 7 - print(e) 8 - else: 9 - pass 10 - finally: 11 - pass
-9
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/try/with-except-else.py
··· 1 - def dangerous_func(): 2 - pass 3 - 4 - try: 5 - dangerous_func() 6 - except: 7 - pass 8 - else: 9 - pass
-9
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/try/with-except-finally.py
··· 1 - def dangerous_func(): 2 - pass 3 - 4 - try: 5 - dangerous_func() 6 - except Exception: 7 - pass 8 - finally: 9 - pass
-7
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/try/with-except.py
··· 1 - def dangerous_func(): 2 - pass 3 - 4 - try: 5 - dangerous_func() 6 - except ValueError as e: 7 - print(e)
-7
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/try/with-finally.py
··· 1 - def dangerous_func(): 2 - pass 3 - 4 - try: 5 - dangerous_func() 6 - finally: 7 - pass
-6
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/while/while-else.py
··· 1 - def should_continue(): 2 - return False 3 - while should_continue(): 4 - pass 5 - else: 6 - print("done")
-4
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/while/while.py
··· 1 - x = 3 2 - while x > 0: 3 - print(x) 4 - x = x - 1
-8
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/with/with-alias.py
··· 1 - class context_manager: 2 - def __enter__(self): 3 - return self 4 - def __exit__(self, exc_type, exc_val, exc_tb): 5 - return False 6 - 7 - with context_manager() as alias: 8 - pass
-9
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/with/with-async.py
··· 1 - class context_manager: 2 - def __enter__(self): 3 - return self 4 - def __exit__(self, exc_type, exc_val, exc_tb): 5 - return False 6 - 7 - async def foo(): 8 - async with context_manager(): 9 - pass
-20
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/with/with-many-items.py
··· 1 - class context_manager: 2 - def __enter__(self): 3 - return self 4 - def __exit__(self, exc_type, exc_val, exc_tb): 5 - return False 6 - 7 - class context_manager2: 8 - def __enter__(self): 9 - return self 10 - def __exit__(self, exc_type, exc_val, exc_tb): 11 - return False 12 - 13 - class context_manager3: 14 - def __enter__(self): 15 - return self 16 - def __exit__(self, exc_type, exc_val, exc_tb): 17 - return False 18 - 19 - with context_manager() as alias, context_manager2() as (a, b), context_manager3(): 20 - pass
-8
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/with/with-tuple-alias.py
··· 1 - class context_manager: 2 - def __enter__(self): 3 - return self 4 - def __exit__(self, exc_type, exc_val, exc_tb): 5 - return False 6 - 7 - with context_manager() as (a, b): 8 - pass
-8
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/statements/with/with.py
··· 1 - class context_manager: 2 - def __enter__(self): 3 - return self 4 - def __exit__(self, exc_type, exc_val, exc_tb): 5 - return False 6 - 7 - with context_manager(): 8 - pass
-1
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/structure/comment/simple.py
··· 1 - # This is a comment
-2
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/structure/sourceFile/simple.py
··· 1 - a = 1 2 - b = 2
-3
packages/openapi-python/packages/openapi-python/src/ts-python/__tests__/nodes/structure/sourceFile/with-docstring.py
··· 1 - """This is a module-level docstring.""" 2 - 3 - foo = 1
+5
packages/openapi-python/vitest.setup.ts
··· 1 + import { beforeAll } from 'vitest'; 2 + 3 + beforeAll(() => { 4 + process.chdir(new URL('.', import.meta.url).pathname); 5 + });
+5
packages/openapi-ts/vitest.setup.ts
··· 2 2 3 3 import { TestBed } from '@angular/core/testing'; 4 4 import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing'; 5 + import { beforeAll } from 'vitest'; 5 6 6 7 TestBed.initTestEnvironment(BrowserTestingModule, platformBrowserTesting()); 8 + 9 + beforeAll(() => { 10 + process.chdir(new URL('.', import.meta.url).pathname); 11 + });
+1
vitest.config.ts
··· 25 25 test: { 26 26 name: '@hey-api/openapi-python', 27 27 root: 'packages/openapi-python', 28 + setupFiles: ['./vitest.setup.ts'], 28 29 }, 29 30 }, 30 31 {