Matt Drago
05/01/2021, 10:25 PMpytest
results in 15 Failed tests
I figure that I have missed some steps. I'll include what I have done in the thread.git clone <https://github.com/mattdrago/prefect.git>
cd prefect
python3 -m venv .venv
git remote add upstream <https://github.com/PrefectHQ/prefect.git>
git fetch upstream
git merge upstream/master
. .venv/bin/activate
pip3 install -e ".[dev]"
This command gives me the first problem:
Building wheels for collected packages: pytest-env
Building wheel for pytest-env (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/matt/projects/prefect/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8z_zmtq1/pytest-env/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8z_zmtq1/pytest-env/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wgtfg7fv
cwd: /tmp/pip-install-8z_zmtq1/pytest-env/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for pytest-env
Running setup.py clean for pytest-env
Failed to build pytest-env
pip3 install wheel
before the pip3 install -e ".[dev]"
command has resolved that issue.pytest
13 failed, 5559 passed, 97 skipped, 2 xpassed, 267 warnings in 310.87s (0:05:10)
All of the failed tests have the following at the end of their output:
E assert 1 == 0
E + where 1 = <Result TypeError("'>' not supported between instances of 'MagicMock' and 'MagicMock'")>.exit_code
FAILED tests/cli/test_auth.py::test_list_tenants - assert 1 == 0
FAILED tests/cli/test_auth.py::test_list_tokens - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_flows_cloud - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_flows_populated - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_projects - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_projects_populated - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_flow_runs_cloud - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_flow_runs_populated - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_tasks_cloud - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_tasks_populated - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_logs - assert 1 == 0
FAILED tests/cli/test_get.py::test_get_logs_by_id - assert 1 == 0
FAILED tests/cli/test_run.py::test_run_flow_logs - assert 1 == 0
pytest tests
results in all of the tests passing.pip3 install -e ".[all_extras]"
resulted in all of the extra packages being installed. But this failed as I didn't have sql.h
. To fix this, I ran sudo apt install unixodbc-dev
(Ubuntu). Re-running the above pip3 install command then succeeded (Note that there were still errors about versions of libraries not matching, but the overall result was success).Kevin Kho
Matt Drago
05/02/2021, 11:16 PM