Running repository code locally - AssertionError: assert 'chardet'
See original GitHub issueIssue description
I’m running the repository code locally. It works and I was able to install the dev dependencies following the contribution guides.
$ python3 -m pipenv --version
pipenv, version 2022.5.3.dev0
When running pytest
from withing the active virtual environment I get several erros such as the one below.
$ pytest tests/integration/test_install_basic.py::test_basic_dev_install
...
======================================================================================================= FAILURES =======================================================================================================
________________________________________________________________________________________________ test_basic_dev_install ________________________________________________________________________________________________
PipenvInstance = functools.partial(<class 'tests.integration.conftest._PipenvInstance'>, capfd=<_pytest.capture.CaptureFixture object at 0x7efd4a6c3940>)
@flaky
@pytest.mark.dev
@pytest.mark.run
def test_basic_dev_install(PipenvInstance):
with PipenvInstance() as p:
c = p.pipenv("install requests --dev")
assert c.returncode == 0
assert "requests" in p.pipfile["dev-packages"]
assert "requests" in p.lockfile["develop"]
> assert "chardet" in p.lockfile["develop"]
E AssertionError: assert 'chardet' in {'certifi': {'hashes': ['sha256:9c5705e395cd70084351dd8ad5c41e65655e08ce46f2ec9cf6c2c08390f71eb7', 'sha256:f1d53542ee8...256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d'], 'index': 'custom', 'version': '==2.27.1'}, ...}
tests/integration/test_install_basic.py:107: AssertionError
If I comment this specific line the test passes normally, so it seems to be an issue with that particular chardet
dependency.
Expected result
I get the feeling this is an issue with my setup but I hope it helps someone.
Assertion arrangements should be expected to work right away from the repository code.
Actual result
Verbose output: https://gist.github.com/epomatti/99e4a43b2e4d22a431045c10a8d9d24c
Steps to replicate
Setup the local development code and run the test suite, such as in this example:
$ pytest tests/integration/test_install_basic.py::test_basic_dev_install
I’m getting an empty output when running pipenv --support
from both local installation and the repository code.
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top GitHub Comments
@matteius that indeed solved most of my issues.
I re-ran the master CI suite as well to see if there was a recent regression, but there does not appear to be. https://github.com/pypa/pipenv/runs/6736866312?check_suite_focus=true