Skip to content

package_with_function_call_as_name failure on openSUSE builds #280

Description

@jayvdb

I'm not sure why this one is failing. When I test locally, the .name is correct. Injected a print to show what is going on inside.

I checked most of the dependencies and they are up to date.

[   68s] _______________________ test_parse_function_call_as_name _______________________
[   68s] 
[   68s] setup_py_dir = PosixPath('/home/abuild/rpmbuild/BUILD/requirementslib-1.5.16/tests/fixtures/setup_py')
[   68s] pathlib_tmpdir = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0')
[   68s] 
[   68s]     def test_parse_function_call_as_name(setup_py_dir, pathlib_tmpdir):
[   68s]         package_dir = pathlib_tmpdir.joinpath("package_with_function_call_as_name").as_posix()
[   68s]         setup_dir = setup_py_dir.joinpath("package_with_function_call_as_name").as_posix()
[   68s]         shutil.copytree(setup_dir, package_dir)
[   68s]         req = Requirement.from_line("-e {}".format(package_dir))
[   68s] >       print(repr(req)); assert req.name == "package-with-function-call-as-name"
[   68s] E       AssertionError: assert None == 'package-with-function-call-as-name'
[   68s] E         +None
[   68s] E         -'package-with-function-call-as-name'
[   68s] 
[   68s] tests/unit/test_setup_info.py:259: AssertionError
[   68s] ----------------------------- Captured stdout call -----------------------------
[   68s] Requirement(_name=None, vcs=None, req=FileRequirement(setup_path='/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name/setup.py', path='/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name', editable=True, extras=(), _uri_scheme='path', uri='file:///tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name', link=<Link file:///tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name>, pyproject_requires=None, pyproject_backend=None, pyproject_path=None, subdirectory=None, _setup_info=SetupInfo(name=None, base_dir='/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name', _version='1.0.0', _requirements=frozenset(), build_requires=(), build_backend='setuptools.build_meta:__legacy__', setup_requires=(), python_requires=None, _extras_requirements=(), setup_cfg=PosixPath('/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name/setup.cfg'), setup_py=PosixPath('/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name/setup.py'), pyproject=PosixPath('/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name/pyproject.toml'), ireq=<InstallRequirement object: file:///tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name editable=True>, extra_kwargs={'build_dir': '/tmp/reqlib-buildtql_b8xe', 'src_dir': '/tmp/reqlib-srcz7zhgk2o', 'download_dir': '/home/abuild/.cache/pipenv/pkgs', 'wheel_download_dir': '/home/abuild/.cache/pipenv/wheels'}, metadata=None, stack=<contextlib.ExitStack object at 0xb5e1e430>, _finalizer=<finalize object at 0xb557dc40; for 'SetupInfo' at 0xb5835130>), _has_hashed_name=False, _parsed_line=<Line (editable=True, name=None, path=/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name, uri=file:///tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name, extras=(), markers=None, vcs=None, specifier===1.0.0, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=file:///tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name)>, name=None, req=None), markers=None, _specifiers='', index=None, editable=True, hashes=frozenset(), extras=(), abstract_dep=None, _line_instance=<Line (editable=True, name=None, path=/tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name, uri=file:///tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name, extras=(), markers=None, vcs=None, specifier===1.0.0, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=file:///tmp/pytest-of-abuild/pytest-0/test_parse_function_call_as_na0/package_with_function_call_as_name)>, _ireq=None)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions