Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in tests: #429

Closed
yurivict opened this issue Dec 18, 2022 · 2 comments
Closed

Errors in tests: #429

yurivict opened this issue Dec 18, 2022 · 2 comments

Comments

@yurivict
Copy link

yurivict commented Dec 18, 2022

=========================================================================================== ERRORS ===========================================================================================
_______________________________________________________________________ ERROR at setup of EcdsaTestCase.test_roundtrip _______________________________________________________________________

    @pytest.fixture(scope='module', autouse=True)
    def gmpy_extension():
        """Initialize the gmpy extension for this test module"""
>       jsonpickle.ext.gmpy.register_handlers()
E       AttributeError: module 'jsonpickle.ext' has no attribute 'gmpy'

tests/ecdsa_test.py:15: AttributeError
========================================================================================== FAILURES ==========================================================================================
________________________________________________________________________________________ test session ________________________________________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x9c23cf940>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: "Callable[[], TResult]",
        when: "Literal['collect', 'setup', 'call', 'teardown']",
        reraise: Optional[
            Union[Type[BaseException], Tuple[Type[BaseException], ...]]
        ] = None,
    ) -> "CallInfo[TResult]":
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :param when:
            The phase in which the function is called.
        :param reraise:
            Exception or exceptions that shall propagate if raised by the
            function, instead of being wrapped in the CallInfo.
        """
        excinfo = None
        start = timing.time()
        precise_start = timing.perf_counter()
        try:
>           result: Optional[TResult] = func()

/usr/local/lib/python3.9/site-packages/_pytest/runner.py:339: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
    )

/usr/local/lib/python3.9/site-packages/_pytest/runner.py:260: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_HookCaller 'pytest_runtest_call'>, args = (), kwargs = {'item': <CheckdocsItem project>}, argname = 'item', firstresult = False

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
    
        # This is written to avoid expensive operations when not needed.
        if self.spec:
            for argname in self.spec.argnames:
                if argname not in kwargs:
                    notincall = tuple(set(self.spec.argnames) - kwargs.keys())
                    warnings.warn(
                        "Argument(s) {} which are declared in the hookspec "
                        "can not be found in this hook call".format(notincall),
                        stacklevel=2,
                    )
                    break
    
            firstresult = self.spec.opts.get("firstresult")
        else:
            firstresult = False
    
>       return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)

/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py:265: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.config.PytestPluginManager object at 0x82a3dfd90>, hook_name = 'pytest_runtest_call'
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/local/lib/python3.9/site-packages/_pytest/...pper name='/dev/null' mode='r' encoding='utf-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...]
kwargs = {'item': <CheckdocsItem project>}, firstresult = False

    def _hookexec(self, hook_name, methods, kwargs, firstresult):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook_name, methods, kwargs, firstresult)

/usr/local/lib/python3.9/site-packages/pluggy/_manager.py:80: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook_name = 'pytest_runtest_call'
hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/local/lib/python3.9/site-packages/_pytest/...pper name='/dev/null' mode='r' encoding='utf-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...]
caller_kwargs = {'item': <CheckdocsItem project>}, firstresult = False

    def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):
        """Execute a call into multiple python functions/methods and return the
        result(s).
    
        ``caller_kwargs`` comes from _HookCaller.__call__().
        """
        __tracebackhide__ = True
        results = []
        excinfo = None
        try:  # run impl and wrapper setup functions in a loop
            teardowns = []
            try:
                for hook_impl in reversed(hook_impls):
                    try:
                        args = [caller_kwargs[argname] for argname in hook_impl.argnames]
                    except KeyError:
                        for argname in hook_impl.argnames:
                            if argname not in caller_kwargs:
                                raise HookCallError(
                                    f"hook call must provide argument {argname!r}"
                                )
    
                    if hook_impl.hookwrapper:
                        try:
                            gen = hook_impl.function(*args)
                            next(gen)  # first yield
                            teardowns.append(gen)
                        except StopIteration:
                            _raise_wrapfail(gen, "did not yield")
                    else:
                        res = hook_impl.function(*args)
                        if res is not None:
                            results.append(res)
                            if firstresult:  # halt further impl calls
                                break
            except BaseException:
                excinfo = sys.exc_info()
        finally:
            if firstresult:  # first result hooks return a single value
                outcome = _Result(results[0] if results else None, excinfo)
            else:
                outcome = _Result(results, excinfo)
    
            # run all wrapper post-yield blocks
            for gen in reversed(teardowns):
                try:
                    gen.send(outcome)
                    _raise_wrapfail(gen, "has second yield")
                except StopIteration:
                    pass
    
>           return outcome.get_result()

/usr/local/lib/python3.9/site-packages/pluggy/_callers.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pluggy._result._Result object at 0x8f4e9b910>

    def get_result(self):
        """Get the result(s) for this hook call.
    
        If the hook was marked as a ``firstresult`` only a single value
        will be returned otherwise a list of results.
        """
        __tracebackhide__ = True
        if self._excinfo is None:
            return self._result
        else:
            ex = self._excinfo
>           raise ex[1].with_traceback(ex[2])

/usr/local/lib/python3.9/site-packages/pluggy/_result.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook_name = 'pytest_runtest_call'
hook_impls = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/local/lib/python3.9/site-packages/_pytest/...pper name='/dev/null' mode='r' encoding='utf-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...]
caller_kwargs = {'item': <CheckdocsItem project>}, firstresult = False

    def _multicall(hook_name, hook_impls, caller_kwargs, firstresult):
        """Execute a call into multiple python functions/methods and return the
        result(s).
    
        ``caller_kwargs`` comes from _HookCaller.__call__().
        """
        __tracebackhide__ = True
        results = []
        excinfo = None
        try:  # run impl and wrapper setup functions in a loop
            teardowns = []
            try:
                for hook_impl in reversed(hook_impls):
                    try:
                        args = [caller_kwargs[argname] for argname in hook_impl.argnames]
                    except KeyError:
                        for argname in hook_impl.argnames:
                            if argname not in caller_kwargs:
                                raise HookCallError(
                                    f"hook call must provide argument {argname!r}"
                                )
    
                    if hook_impl.hookwrapper:
                        try:
                            gen = hook_impl.function(*args)
                            next(gen)  # first yield
                            teardowns.append(gen)
                        except StopIteration:
                            _raise_wrapfail(gen, "did not yield")
                    else:
>                       res = hook_impl.function(*args)

/usr/local/lib/python3.9/site-packages/pluggy/_callers.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = <CheckdocsItem project>

    def pytest_runtest_call(item: Item) -> None:
        _update_current_test_var(item, "call")
        try:
            del sys.last_type
            del sys.last_value
            del sys.last_traceback
        except AttributeError:
            pass
        try:
            item.runtest()
        except Exception as e:
            # Store trace info to allow postmortem debugging
            sys.last_type = type(e)
            sys.last_value = e
            assert e.__traceback__ is not None
            # Skip *this* frame
            sys.last_traceback = e.__traceback__.tb_next
>           raise e

/usr/local/lib/python3.9/site-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = <CheckdocsItem project>

    def pytest_runtest_call(item: Item) -> None:
        _update_current_test_var(item, "call")
        try:
            del sys.last_type
            del sys.last_value
            del sys.last_traceback
        except AttributeError:
            pass
        try:
>           item.runtest()

/usr/local/lib/python3.9/site-packages/_pytest/runner.py:167: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <CheckdocsItem project>

    def runtest(self):
>       desc = self.get_long_description()

/usr/local/lib/python3.9/site-packages/pytest_checkdocs/__init__.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <CheckdocsItem project>

    def get_long_description(self):
        with _suppress_deprecation():
>           return Description.from_md(ensure_clean(load_metadata('.')))

/usr/local/lib/python3.9/site-packages/pytest_checkdocs/__init__.py:73: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

srcdir = '.', isolated = True

    def project_wheel_metadata(
        srcdir: build.PathType,
        isolated: bool = True,
    ) -> 'importlib_metadata.PackageMetadata':
        """
        Return the wheel metadata for a project.
    
        Uses the ``prepare_metadata_for_build_wheel`` hook if available,
        otherwise ``build_wheel``.
    
        :param srcdir: Project source directory
        :param isolated: Whether or not to run invoke the backend in the current
                         environment or to create an isolated one and invoke it
                         there.
        """
        builder = build.ProjectBuilder(
            os.fspath(srcdir),
            runner=pep517.quiet_subprocess_runner,
        )
    
        if not isolated:
            return _project_wheel_metadata(builder)
    
>       with build.env.IsolatedEnvBuilder() as env:

/usr/local/lib/python3.9/site-packages/build/util.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <build.env.IsolatedEnvBuilder object at 0x9c0fc4190>

    def __enter__(self) -> IsolatedEnv:
        """
        Create an isolated build environment.
    
        :return: The isolated build environment
        """
        # Call ``realpath`` to prevent spurious warning from being emitted
        # that the venv location has changed on Windows. The username is
        # DOS-encoded in the output of tempfile - the location is the same
        # but the representation of it is different, which confuses venv.
        # Ref: https://bugs.python.org/issue46171
        self._path = os.path.realpath(tempfile.mkdtemp(prefix='build-env-'))
        try:
            # use virtualenv when available (as it's faster than venv)
>           if _should_use_virtualenv():

/usr/local/lib/python3.9/site-packages/build/env.py:103: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    @functools.lru_cache(maxsize=None)
    def _should_use_virtualenv() -> bool:
        import packaging.requirements
    
        # virtualenv might be incompatible if it was installed separately
        # from build. This verifies that virtualenv and all of its
        # dependencies are installed as specified by build.
>       return virtualenv is not None and not any(
            packaging.requirements.Requirement(d[1]).name == 'virtualenv'
            for d in build.check_dependency('build[virtualenv]')
            if len(d) > 1
        )

/usr/local/lib/python3.9/site-packages/build/env.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <generator object check_dependency at 0x9c6fe4820>

>   return virtualenv is not None and not any(
        packaging.requirements.Requirement(d[1]).name == 'virtualenv'
        for d in build.check_dependency('build[virtualenv]')
        if len(d) > 1
    )

/usr/local/lib/python3.9/site-packages/build/env.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

req_string = 'build[virtualenv]', ancestral_req_strings = (), parent_extras = frozenset()

    def check_dependency(
        req_string: str, ancestral_req_strings: Tuple[str, ...] = (), parent_extras: AbstractSet[str] = frozenset()
    ) -> Iterator[Tuple[str, ...]]:
        """
        Verify that a dependency and all of its dependencies are met.
    
        :param req_string: Requirement string
        :param parent_extras: Extras (eg. "test" in myproject[test])
        :yields: Unmet dependencies
        """
        import packaging.requirements
    
        if sys.version_info >= (3, 8):
            import importlib.metadata as importlib_metadata
        else:
            import importlib_metadata
    
        req = packaging.requirements.Requirement(req_string)
    
        if req.marker:
            extras = frozenset(('',)).union(parent_extras)
            # a requirement can have multiple extras but ``evaluate`` can
            # only check one at a time.
            if all(not req.marker.evaluate(environment={'extra': e}) for e in extras):
                # if the marker conditions are not met, we pretend that the
                # dependency is satisfied.
                return
    
        try:
            dist = importlib_metadata.distribution(req.name)  # type: ignore[no-untyped-call]
        except importlib_metadata.PackageNotFoundError:
            # dependency is not installed in the environment.
            yield ancestral_req_strings + (req_string,)
        else:
            if req.specifier and not req.specifier.contains(dist.version, prereleases=True):
                # the installed version is incompatible.
                yield ancestral_req_strings + (req_string,)
            elif dist.requires:
                for other_req_string in dist.requires:
                    # yields transitive dependencies that are not satisfied.
>                   yield from check_dependency(other_req_string, ancestral_req_strings + (req_string,), req.extras)

/usr/local/lib/python3.9/site-packages/build/__init__.py:201: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

req_string = 'pep517>=0.9.1', ancestral_req_strings = ('build[virtualenv]',), parent_extras = {'virtualenv'}

    def check_dependency(
        req_string: str, ancestral_req_strings: Tuple[str, ...] = (), parent_extras: AbstractSet[str] = frozenset()
    ) -> Iterator[Tuple[str, ...]]:
        """
        Verify that a dependency and all of its dependencies are met.
    
        :param req_string: Requirement string
        :param parent_extras: Extras (eg. "test" in myproject[test])
        :yields: Unmet dependencies
        """
        import packaging.requirements
    
        if sys.version_info >= (3, 8):
            import importlib.metadata as importlib_metadata
        else:
            import importlib_metadata
    
        req = packaging.requirements.Requirement(req_string)
    
        if req.marker:
            extras = frozenset(('',)).union(parent_extras)
            # a requirement can have multiple extras but ``evaluate`` can
            # only check one at a time.
            if all(not req.marker.evaluate(environment={'extra': e}) for e in extras):
                # if the marker conditions are not met, we pretend that the
                # dependency is satisfied.
                return
    
        try:
            dist = importlib_metadata.distribution(req.name)  # type: ignore[no-untyped-call]
        except importlib_metadata.PackageNotFoundError:
            # dependency is not installed in the environment.
            yield ancestral_req_strings + (req_string,)
        else:
>           if req.specifier and not req.specifier.contains(dist.version, prereleases=True):

/usr/local/lib/python3.9/site-packages/build/__init__.py:195: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <SpecifierSet('>=0.9.1')>, item = None, prereleases = True

    def contains(
        self, item: UnparsedVersion, prereleases: Optional[bool] = None
    ) -> bool:
    
        # Ensure that our item is a Version or LegacyVersion instance.
        if not isinstance(item, (LegacyVersion, Version)):
>           item = parse(item)

/usr/local/lib/python3.9/site-packages/packaging/specifiers.py:728: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

version = None

    def parse(version: str) -> Union["LegacyVersion", "Version"]:
        """
        Parse the given version string and return either a :class:`Version` object
        or a :class:`LegacyVersion` object depending on if the given version is
        a valid PEP 440 version or a legacy version.
        """
        try:
>           return Version(version)

/usr/local/lib/python3.9/site-packages/packaging/version.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <[AttributeError("'Version' object has no attribute '_version'") raised in repr()] Version object at 0x9c7a825b0>, version = None

    def __init__(self, version: str) -> None:
    
        # Validate the version and parse it into pieces
>       match = self._regex.search(version)
E       TypeError: expected string or bytes-like object

/usr/local/lib/python3.9/site-packages/packaging/version.py:264: TypeError
====================================================================================== warnings summary ======================================================================================
../../../../../../usr/local/lib/python3.9/site-packages/pytest_freezegun.py:17: 638 warnings
  /usr/local/lib/python3.9/site-packages/pytest_freezegun.py:17: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'):

tests/sklearn_test.py::test_decision_tree
tests/numpy_test.py::test_ndarray_roundtrip
  /disk-samsung/freebsd-ports/devel/py-jsonpickle/work-py39/jsonpickle-3.0.1/jsonpickle/ext/numpy.py:307: UserWarning: ndarray is defined by reference to an object we do not know how to serialize. A deep copy is serialized instead, breaking memory aliasing.
    warnings.warn(msg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ===================================================================================
SKIPPED [1] tests/feedparser_test.py:85: feedparser module not available, please install
SKIPPED [1] tests/backend_test.py:68: yajl not available; please install
SKIPPED [1] tests/backend_test.py:76: yajl not available; please install
SKIPPED [1] tests/backend_test.py:166: yajl not available; please install
========================================================= 1 failed, 310 passed, 4 skipped, 3 xpassed, 640 warnings, 1 error in 3.80s =========================================================

Version: 3.0.1
Python-3.9
FreeBSD 13.1

@stefan6419846
Copy link

Could you please add some more context of what makes this issue different from the other ones? #419 and #428 seem to cover the failures already, with #419 still awaiting your feedback. The DeprecationWarning is already being tracked at ktosiek/pytest-freezegun#35.

@yurivict
Copy link
Author

Sorry, this is a duplicate of #419.

@yurivict yurivict closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants