This repository has no description
0

Configure Feed

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

Added tests for Jugulis

+152 -339
-1
conftest.py
··· 7 7 from pytest import hookimpl 8 8 from hypothesis import HealthCheck 9 9 from hypothesis import settings 10 - from functools import partial 11 10 12 11 # Adapted From: https://docs.pytest.org/en/stable/example/simple.html 13 12 # And: https://github.com/pytest-dev/pytest/issues/5024#issuecomment-2078698395
+24 -8
packages/bundle/bundle/__init__.py
··· 551 551 arguments = self._filter_params(other.params, click.Argument) 552 552 return ( 553 553 all( 554 - self._equal( 554 + False 555 + for index, param in enumerate(self._arguments) 556 + if not self._equal( 555 557 param, 556 558 arguments[index], 557 559 obj_name=f"{self.name}:{param.name}", 558 560 other_name=f"{other.name}:{param.name}", 559 561 ) 560 - for index, param in enumerate(self._arguments) 561 562 ) 562 563 and all( 563 - self._equal( 564 + False 565 + for index, param in enumerate(self._options) 566 + if not self._equal( 564 567 param, 565 568 options[index], 566 569 obj_name=f"{self.name}:{param.name}", 567 570 other_name=f"{other.name}:{param.name}", 568 571 ) 569 - for index, param in enumerate(self._options) 570 572 ) 571 573 and self._equal( 572 574 self.func, ··· 576 578 obj_name=f"self: {self.name}", 577 579 other_name=f"other: {other.name}", 578 580 ) 581 + # and all( 582 + # v._equals(other.commands[k], *ignores) if k in other.commands else False 583 + # for k, v in self.children.items() 584 + # ) 579 585 and all( 580 - v._equals(other.commands[k], *ignores) if k in other.commands else False 586 + False 581 587 for k, v in self.children.items() 588 + if not ( 589 + (k in other.commands) and v._equals(other.commands[k], *ignores) 590 + ) 582 591 ) 583 592 ) 584 593 ··· 589 598 return ( 590 599 self.equals(other) 591 600 and self._func == other.callback 601 + # and all( 602 + # (v._func == other.commands[k].callback) 603 + # if k in other.commands 604 + # else False 605 + # for k, v in self.children.items() 606 + # ) 592 607 and all( 593 - (v._func == other.commands[k].callback) 594 - if k in other.commands 595 - else False 608 + False 596 609 for k, v in self.children.items() 610 + if not ( 611 + (k in other.commands) and (v._func == other.commands[k].callback) 612 + ) 597 613 ) 598 614 ) 599 615
-3
packages/hydrox/hydrox/helpers/cache.py
··· 3 3 import collections.abc as abc 4 4 from .decorator import Decorator 5 5 from .helpers import zipsuppress 6 - from contextlib import suppress 7 6 from functools import partial, wraps, cache as defcache 8 7 from inspect import isclass, getattr_static 9 - from rich import print 10 - from rich.rule import Rule 11 8 12 9 sentinel = object() 13 10
+1 -3
packages/hydrox/hydrox/helpers/helpers.py
··· 15 15 getmodule, 16 16 ) 17 17 from itertools import permutations 18 - from more_itertools import powerset, collapse 18 + from more_itertools import powerset 19 19 20 20 BString: typing.TypeAlias = str | bytes | bytearray 21 21 ··· 104 104 105 105 class FlattenMeta(type): 106 106 def __call__(self, *iterables, use=builtins.tuple(), levels=None, current_level=0): 107 - if levels is None: 108 - yield from collapse(use or iterables) 109 107 for iterable in use or iterables: 110 108 if isinstance(iterable, Collection) and ( 111 109 (levels is None) or (current_level < levels)
+1 -1
packages/hydrox/hydrox/hypothesis/__init__.py
··· 76 76 try: 77 77 hash(apply_kwargs(strat).example()) 78 78 except TypeError as e: 79 - if not "unhashable type:" in str(e): 79 + if "unhashable type:" not in str(e): 80 80 raise e 81 81 except AttributeError as e: 82 82 if str(e) != "'NoneType' object has no attribute 'example'":
+10 -16
packages/hydrox/hydrox/typing/generic.py
··· 9 9 import gc 10 10 import inspect 11 11 import operator 12 - import os 13 12 import re 14 13 import sys 15 14 ··· 21 20 from abc import ABCMeta 22 21 from contextlib import suppress 23 22 from collections import defaultdict 24 - from cytoolz.itertoolz import unique, partition 25 - from cytoolz.dicttoolz import keymap, valmap 23 + from cytoolz.dicttoolz import keymap 24 + from cytoolz.itertoolz import unique 26 25 from functools import partial, reduce, cache as defcache 27 26 from inspect import Parameter 28 - from inspect import getmro, stack, FrameInfo 29 - from random import randint, sample 30 - from rich import print 31 - from rich.traceback import Traceback 32 - from rich.rule import Rule 33 - from rich.pretty import pprint 27 + from inspect import getmro, stack 28 + from more_itertools import partition 29 + from random import randint 34 30 from rich.table import Table 35 31 from rich.console import Console 36 32 from warnings import warn ··· 445 441 super().__setitem__(get_name(key), value) 446 442 447 443 def _process_dict(self, other): 448 - return {get_name(k): v for k, v in other.items()} 444 + return keymap(get_name, other) 449 445 450 446 def copy(self): # don't delegate w/ super - dict.copy() -> dict :( 451 447 return self.__class__(base=self) ··· 1032 1028 try: 1033 1029 return obj.__genericsupertype__() 1034 1030 except TypeError as e: 1035 - if not "missing 1 required positional argument: 'cls'" in str(e): 1031 + if "missing 1 required positional argument: 'cls'" not in str(e): 1036 1032 raise e 1037 1033 return obj.__genericsupertype__(obj) 1038 1034 ··· 1054 1050 format_args( 1055 1051 dict, 1056 1052 [ 1057 - unionize(types.UnionType, keymap(inner, obj)), 1058 - unionize(types.UnionType, valmap(inner, obj)), 1053 + unionize(types.UnionType, [inner(k) for k in obj.keys()]), 1054 + unionize(types.UnionType, [inner(v) for v in obj.values()]), 1059 1055 ], 1060 1056 ) 1061 1057 ) ··· 1962 1958 alias_result.__hash_value__ = reducehash( 1963 1959 origin, 1964 1960 ( 1965 - tuple(arg.items()) 1961 + arg.items() 1966 1962 if isinstance(arg, abc.Mapping) 1967 - else tuple(arg) 1968 - if isinstance(arg, list) 1969 1963 else arg 1970 1964 for arg in args 1971 1965 ),
+1 -4
packages/hydrox/hydrox/typing/tests/test_generic.py
··· 3 3 from hydrox.hypothesis import Args, AllGeneric, HTGenericAlias 4 4 import hydrox.typing as ht 5 5 import hydrox.helpers as hh 6 - import typing 7 - import collections.abc as abc 8 - from hypothesis import given, strategies as st, example 9 - from rich.pretty import pprint 6 + from hypothesis import given 10 7 11 8 # @given( 12 9 # generic=...,
-173
packages/hydrox/hydrox/typing/tests/test_isinmrosubclass_getter.py
··· 1 - # import hydrox.typing as ht 2 - # from hydrox.helpers import superpowerset, flatten 3 - # from hypothesis import given, strategies as st, example 4 - # from random import randint, randrange 5 - # from collections import defaultdict 6 - # from pytest import mark 7 - 8 - # all_attrs = tuple(superpowerset("in", "is", "generic", "ht", "only")) 9 - 10 - # ht_generic_attrs = [] 11 - # no_ht_generic_attrs = [] 12 - # for p in all_attrs: 13 - # if p: 14 - # if "ht" in p or "generic" in p: 15 - # ht_generic_attrs.append(p) 16 - # else: 17 - # no_ht_generic_attrs.append("".join(p)) 18 - 19 - # ends_with_in_is_attrs = [] 20 - # in_is_is_in_attrs = [] 21 - # usable_attrs = [] 22 - # only_attrs = [] 23 - # for p in ht_generic_attrs: 24 - # length = len(p) 25 - # attr = "".join(p) 26 - # if length > 1: 27 - # if p[-1] in ("in", "is"): 28 - # ends_with_in_is_attrs.append(attr) 29 - # continue 30 - # if "inis" in attr or "isin" in attr: 31 - # in_is_is_in_attrs.append(attr) 32 - # continue 33 - # current_key = "global" 34 - # new_attrs = defaultdict(str) 35 - # for a in filter( 36 - # None, flatten(part.partition("is") for part in attr.partition("in")) 37 - # ): 38 - # if a == "in": 39 - # current_key = "in" 40 - # continue 41 - # if a == "is": 42 - # current_key = "is" 43 - # continue 44 - # new_attrs[current_key] = a 45 - # global_attr = new_attrs["global"] 46 - # broken = False 47 - # for i in ("in", "is"): 48 - # i_attr = new_attrs["global"] + new_attrs[i] 49 - # if i_attr and not ("ht" in i_attr or "generic" in i_attr): 50 - # only_attrs.append(attr) 51 - # broken = True 52 - # break 53 - # if broken: 54 - # continue 55 - # usable_attrs.append(p) 56 - 57 - # multiple_in_is_attrs = [] 58 - # for p in usable_attrs: 59 - # length = len(p) 60 - # if length > 1: 61 - # in_is = "in" if randint(0, 1) else "is" 62 - # p = list(p) 63 - # for i in range(length): 64 - # pos = randrange(1, length) 65 - # p.insert(pos, in_is) 66 - # multiple_in_is_attrs.append("".join(p)) 67 - 68 - # is_in_attrs = [] 69 - # no_is_in_attrs = [] 70 - # for p in usable_attrs: 71 - # attr = "".join(p) 72 - # if "in" in p or "is" in p: 73 - # is_in_attrs.append(attr) 74 - # else: 75 - # no_is_in_attrs.append(attr) 76 - 77 - 78 - # class TestIsInMROSubclassGetter: 79 - # @given(attr=st.sampled_from(is_in_attrs)) 80 - # @example(attr="genericinhtisonly") 81 - # def test_is_in(self, attr): 82 - # only = {} 83 - # getters = {} 84 - # only["in"], getters["in"], only["is"], getters["is"] = ( 85 - # ht.isinmrosubclass.getter(attr) 86 - # ) 87 - # current_key = "global" 88 - # new_attrs = defaultdict(str) 89 - # for a in filter( 90 - # None, flatten(part.partition("is") for part in attr.partition("in")) 91 - # ): 92 - # if a == "in": 93 - # current_key = "in" 94 - # if a == "is": 95 - # current_key = "is" 96 - # new_attrs[current_key] = a 97 - # for i in ("in", "is"): 98 - # i_attr = new_attrs["global"] + new_attrs[i] 99 - # if "only" in i_attr: 100 - # assert only[i], i 101 - # if "ht" in i_attr: 102 - # if "generic" in i_attr: 103 - # assert getters[i] == ht.get_all_ht_generics, i 104 - # else: 105 - # assert getters[i] == ht.HTGenerics.__getitem__, i 106 - # elif "generic" in i_attr: 107 - # assert getters[i] == ht.get_all_generics, i 108 - # else: 109 - # assert getters[i] is None 110 - 111 - # @given(attr=st.sampled_from(no_is_in_attrs)) 112 - # def test_no_is_in(self, attr): 113 - # inmro_only, inmro_getter, issubclass_only, issubclass_getter = ( 114 - # ht.isinmrosubclass.getter(attr) 115 - # ) 116 - # if "only" in attr: 117 - # assert inmro_only and issubclass_only 118 - # if "ht" in attr: 119 - # if "generic" in attr: 120 - # assert inmro_getter == issubclass_getter == ht.get_all_ht_generics 121 - # else: 122 - # assert inmro_getter == issubclass_getter == ht.HTGenerics.__getitem__ 123 - # else: 124 - # assert inmro_getter == issubclass_getter == ht.get_all_generics 125 - 126 - # @given(attr=st.sampled_from(in_is_is_in_attrs)) 127 - # def test_in_is_is_in(self, attr): 128 - # try: 129 - # ht.isinmrosubclass.getter(attr) 130 - # except AttributeError as e: 131 - # assert '"in" and "is" cannot be right next to each other' in str(e) 132 - # else: 133 - # assert False 134 - 135 - # @given(attr=st.sampled_from(no_ht_generic_attrs)) 136 - # def test_no_ht_generic(self, attr): 137 - # try: 138 - # ht.isinmrosubclass.getter(attr) 139 - # except AttributeError as e: 140 - # assert 'A combination of "in", "is", "only", "ht", and "generic"' in str(e) 141 - # else: 142 - # assert False 143 - 144 - # @given(attr=st.sampled_from(ends_with_in_is_attrs)) 145 - # def test_starts_ends_with_in_is(self, attr): 146 - # try: 147 - # ht.isinmrosubclass.getter(attr) 148 - # except AttributeError as e: 149 - # assert 'cannot end with "in" or "is"' in str(e) 150 - # else: 151 - # assert False 152 - 153 - # @given(attr=st.sampled_from(multiple_in_is_attrs)) 154 - # def test_multiple_in_is(self, attr): 155 - # try: 156 - # ht.isinmrosubclass.getter(attr) 157 - # except AttributeError as e: 158 - # assert ( 159 - # '"in" and "is" cannot be used more than once in attribute name' 160 - # in str(e) 161 - # ) 162 - # else: 163 - # assert False 164 - 165 - # @given(attr=st.sampled_from(only_attrs)) 166 - # @example(attr="onlyisht") 167 - # def test_only(self, attr): 168 - # try: 169 - # ht.isinmrosubclass.getter(attr) 170 - # except AttributeError as e: 171 - # assert 'A combination of "only", "ht", and "generic"' in str(e) 172 - # else: 173 - # assert False
-61
packages/hydrox/hydrox/typing/tests/test_some.py
··· 1 - # from hydrox.hypothesis import Data, Args, HTGenericAlias 2 - # from hydrox.typing.generic import some 3 - # from hydrox.helpers import Collection 4 - # import hydrox.typing as ht 5 - # import typing 6 - # from hypothesis import given, strategies as st 7 - # from collections import namedtuple 8 - 9 - # Max = namedtuple("Max", "max") 10 - # minimum = 0 11 - 12 - 13 - # # TODO: Simplify. 14 - # class TestSome: 15 - # @given(data=..., generic=..., args=...) 16 - # def test_cls(self, data: Data, generic: HTGenericAlias, args: Args): 17 - # args_length = len(args) 18 - # maximum = data.draw( 19 - # st.integers( 20 - # min_value=minimum, 21 - # max_value=ht.get_generic_subscription_size(generic, rand=True), 22 - # ).filter(lambda i: i < args_length) 23 - # ) 24 - # some_args = some(ht.format_args(generic.__recreate__(maximum), args)) 25 - # some_length = len(some_args) 26 - # assert some_length == maximum 27 - # assert all(a in args for a in some_args) 28 - # assert tuple(some_args) != tuple(args) 29 - 30 - # @given(data=..., generic=..., args=..., maximum=st.integers(min_value=minimum)) 31 - # def test_maximum(self, data: Data, generic: HTGenericAlias, args: Args, maximum): 32 - # args_length = len(args) 33 - # maximum = data.draw( 34 - # st.integers( 35 - # min_value=minimum, 36 - # max_value=ht.get_generic_subscription_size(generic, rand=True), 37 - # ).filter(lambda i: i < args_length) 38 - # ) 39 - # some_args = some(ht.format_args(generic, args), maximum=maximum) 40 - # some_length = len(some_args) 41 - # assert some_length == maximum 42 - # assert all(a in args for a in some_args) 43 - # assert tuple(some_args) != tuple(args) 44 - 45 - # @given(data=..., iterable=...) 46 - # def test_iterable(self, data: Data, iterable: Collection[typing.Any]): 47 - # maximum = data.draw(st.integers(min_value=minimum, max_value=len(iterable) - 1)) 48 - # some_args = some(Max(maximum), iterable) 49 - # some_length = len(some_args) 50 - # assert some_length == maximum 51 - # assert all(a in iterable for a in some_args) 52 - # assert tuple(some_args) != tuple(iterable) 53 - 54 - # @given(data=..., iterable=...) 55 - # def test_maximum_iterable(self, data: Data, iterable: Collection[typing.Any]): 56 - # maximum = data.draw(st.integers(min_value=minimum, max_value=len(iterable) - 1)) 57 - # some_args = some(None, iterable, maximum) 58 - # some_length = len(some_args) 59 - # assert some_length == maximum 60 - # assert all(a in iterable for a in some_args) 61 - # assert tuple(some_args) != tuple(iterable)
-1
packages/hydrox/hydrox/typing/tests/test_subclass.py
··· 11 11 ) 12 12 import hydrox.typing as ht 13 13 from hypothesis import given, strategies as st, example, assume 14 - from pytest import mark 15 14 16 15 17 16 class TestSetSubclass:
-3
packages/hydrox/hydrox/typing/tests/test_tests.py
··· 1 - import os 2 - 3 - 4 1 class TestTests: 5 2 def test_tests(self): 6 3 # raise Exception(os.environ["PYTEST_CURRENT_TEST"])
+2 -1
packages/hydrox/hydrox/typing/tests/types/test_typevar.py
··· 1 - import hydrox.typing as ht, typing 1 + import hydrox.typing as ht 2 + import typing 2 3 from hydrox.hypothesis import AllGeneric, Data, HTGeneric, Args, SubArgs, subgen_strat 3 4 from hypothesis import assume, given, strategies as st, example 4 5
+3 -3
packages/hydrox/hydrox/typing/types.py
··· 4 4 import typing 5 5 6 6 from ..helpers import BString, Collection, flatten, infm1, aleph 7 - from ..typing.generic import Annotation, Generalize, GenericMetas, Generics 7 + from ..typing.generic import Annotation, Generalize, Generics 8 8 from ..typing.generic import ( 9 9 annotation_is_not_generic, 10 10 anything, ··· 30 30 supertype, 31 31 ) 32 32 from ..variables import conversion_table 33 - from contextlib import suppress 34 - from cytoolz.itertoolz import unique, partition 33 + from cytoolz.itertoolz import unique 34 + from more_itertools import partition 35 35 36 36 37 37 @Generalize
-19
packages/hydrox/test1.py
··· 1 - import collections.abc as abc, typing 2 - from warnings import warn 3 - from functools import cache as defcache 4 - from hydrox.helpers import cache, reversecut 5 1 from hydrox.typing import ( 6 - _scoresubclass, 7 - generalize, 8 - generic_flatten, 9 2 GenericMeta, 10 - get_origin, 11 3 has_custom_init, 12 - left_right_collection_check, 13 - partition_ellipsis, 14 - score, 15 - scoreargs, 16 - scoremro, 17 - tryinmro, 18 - tryinmrosubclass, 19 - trysubclass, 20 - TypeWarning, 21 4 ) 22 - from contextlib import contextmanager 23 - from rich.rule import Rule 24 5 25 6 26 7 # NOTE: Can't cache this; booleans, floats, strings, and integers sometimes have the same hash values.
-2
packages/hydrox/test2.py
··· 1 - import hydrox.helpers as hh 2 - 3 1 # assert + 4 2 # assert - 5 3 # assert *
+10
packages/jugulis/jugulis/deino.py
··· 44 44 func = processor(func) 45 45 self.__func__ = func 46 46 47 + def __eq__(self, other: Deino): 48 + return ( 49 + isinstance(other, self.__class__) 50 + and (self.__func__ == other.__func__) 51 + and (self.__cache_kwargs__ == other.__cache_kwargs__) 52 + ) or NotImplemented 53 + 54 + def __hash__(self): 55 + return ht.reducehash(self.__func__, self.__cache_kwargs__.items()) 56 + 47 57 def __process__(self, func): 48 58 func.__signature__ = ht.signature(func) 49 59 func.__spec__ = getfullargspec(func)
+2 -6
packages/jugulis/jugulis/functions.py
··· 1 - import collections.abc as abc, hydrox.typing as ht 1 + import hydrox.typing as ht 2 2 from .variables import sentinel 3 - from contextlib import suppress 4 3 from functools import cache as defcache, partial 5 4 from hydrox.typing import format_args, generalize, get_args, get_origin, scoreinstance 6 - from hydrox.helpers import zipsuppress, CacheError, _make_key 5 + from hydrox.helpers import zipsuppress 7 6 from inspect import FullArgSpec, Parameter, Signature 8 7 from itertools import zip_longest 9 8 from types import MappingProxyType 10 9 from typing import Any, Optional, TypeVar 11 - from rich import print 12 - from rich.rule import Rule 13 - from rich.pretty import pprint 14 10 15 11 16 12 @defcache
+5 -2
packages/jugulis/jugulis/hydreigon.py
··· 1 1 from hydrox.helpers import as_decorator, query, cache_get 2 + from hydrox.typing import reducehash 2 3 from .deino import Deino, format_message 3 - from collections import defaultdict, namedtuple 4 + from collections import defaultdict 4 5 from functools import partial 5 6 from rich.table import Table 6 7 from rich.console import Console 7 - from inspect import isclass 8 8 9 9 console = Console() 10 10 ··· 42 42 self.append( 43 43 Deino(func, self.__cache__, evolved=True, **self.__cache_kwargs__) 44 44 ) 45 + 46 + def __hash__(self): 47 + return reducehash(self) 45 48 46 49 def __score__(self, *args, **kwargs): 47 50 return {func: func.__score__(*args, **kwargs) for func in self}
-1
packages/jugulis/jugulis/jugulis.py
··· 2 2 from hydrox.helpers import as_decorator, query 3 3 from .functions import process_key 4 4 from .hydreigon import Hydreigon 5 - from rich.pretty import pprint 6 5 from collections import defaultdict 7 6 8 7
+52
packages/jugulis/jugulis/tests/conftest.py
··· 1 + from pytest import fixture 2 + from jugulis import Hydreigon 3 + 4 + 5 + @fixture 6 + def f(): 7 + @Hydreigon 8 + def f(a: int, /) -> int: 9 + return 0 10 + 11 + @f.roar 12 + def f(a: int, /, b: int) -> int: 13 + return 1 14 + 15 + @f.roar 16 + def f(a: int, /, b: int, *c) -> int: 17 + return 2 18 + 19 + @f.roar 20 + def f(a: int, /, b: int, *c, d: int) -> int: 21 + return 3 22 + 23 + @f.roar 24 + def f(a: int, /, b: int, *c, d: int, **e) -> int: 25 + return 4 26 + 27 + return f 28 + 29 + 30 + @fixture 31 + def g(): 32 + @Hydreigon 33 + def g(a: int, /) -> int: 34 + return 0 35 + 36 + @g.roar 37 + def g(a: int, /, b: int) -> int: 38 + return 1 39 + 40 + @g.roar 41 + def g(a: int, /, b: int, *c) -> int: 42 + return 2 43 + 44 + @g.roar 45 + def g(a: int, /, b: int, *c, d: int) -> int: 46 + return 3 47 + 48 + @g.roar 49 + def g(a: int, /, b: int, *c, d: int, **e) -> int: 50 + return 4 51 + 52 + return g
+1 -26
packages/jugulis/jugulis/tests/test_hydreigon.py
··· 1 - from jugulis import Hydreigon, AmbiguityError 2 - from pytest import fixture 1 + from jugulis import AmbiguityError 3 2 4 3 5 4 class TestHydreigon: 6 - @fixture 7 - def f(self): 8 - @Hydreigon 9 - def f(a: int, /) -> int: 10 - return 0 11 - 12 - @f.roar 13 - def f(a: int, /, b: int) -> int: 14 - return 1 15 - 16 - @f.roar 17 - def f(a: int, /, b: int, *c) -> int: 18 - return 2 19 - 20 - @f.roar 21 - def f(a: int, /, b: int, *c, d: int) -> int: 22 - return 3 23 - 24 - @f.roar 25 - def f(a: int, /, b: int, *c, d: int, **e) -> int: 26 - return 4 27 - 28 - return f 29 - 30 5 def test_positional_only(self, f): 31 6 assert f(0) == 0 32 7
+22
packages/jugulis/jugulis/tests/test_jugulis.py
··· 1 + from pytest import fixture 2 + from jugulis import Jugulis 3 + from operator import attrgetter 4 + 5 + 6 + # TODO: Test when the functions are being added in an alternating pattern. 7 + class TestJugulis: 8 + @fixture 9 + def jugulis(self): 10 + return Jugulis() 11 + 12 + def test_one_function(self, jugulis, f): 13 + for func in map(attrgetter("__func__"), f): 14 + jugulis(func) 15 + 16 + assert jugulis == {"f": f} 17 + 18 + def test_two_functions(self, jugulis, f, g): 19 + for func in map(attrgetter("__func__"), f + g): 20 + jugulis(func) 21 + 22 + assert jugulis == {"f": f, "g": g}
+3 -1
packages/jugulis/jugulis/tests/test_normalize_typevars.py
··· 1 1 # TODO: Create `bound` examples. 2 2 3 - import hydrox.typing as ht, collections.abc as abc, typing 3 + import hydrox.typing as ht 4 + import collections.abc as abc 5 + import typing 4 6 from hydrox.hypothesis import ( 5 7 Data, 6 8 bound_type_var_strat,
+4 -4
packages/jugulis/jugulis/tests/test_scoring.py
··· 1 - import hydrox.typing as ht, typing, collections.abc 1 + import hydrox.typing as ht 2 + import typing 3 + import collections.abc 2 4 from hydrox.hypothesis import ( 3 5 AllGeneric, 4 6 HTGeneric, 5 7 Data, 6 8 subgen_strat, 7 9 subarg_strat, 8 - arg_strat, 9 10 ) 10 - from hypothesis import assume, strategies as st, given, example 11 + from hypothesis import strategies as st, given, example 11 12 from jugulis import scorefunction 12 13 from inspect import Signature, FullArgSpec, getfullargspec 13 - from parametrized import parametrized 14 14 from pytest import fixture 15 15 16 16
+11
packages/jugulis/test3.py
··· 1 + from jugulis import Deino 2 + 3 + 4 + def test(): ... 5 + 6 + 7 + assert Deino(test) == Deino(test) 8 + 9 + from jugulis import Hydreigon 10 + 11 + assert Hydreigon(test) == Hydreigon(test)