mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 23:22:11 +03:00
This effectively reverts https://github.com/deltachat/deltachat-core-rust/pull/964 for chat.rs, which in that PR was thought to fix something. So maybe something is still broken? But after improving tests the previous code seems to be correct. - Update Python bindings to not always use dc_prepare_msg path when sending messages with attachements. When using dc_prepare_msg the blobs need to be created in the blobdir since they will not get copied and many tests where not doing this. - Add a test that ensures that calling dc_prepare_msg with a file **not** in the blobdir fails. - Add a test that ensures that calling dc_send_msg directly with a file **not** in the blobdir copies the file to the blobdir. This test cheats a little by knowing what the filename in the blobdir will be which is implementation-dependent and thus a bit brittle. But for now it proves correct behaviour so let's go with this. - Improve the test_forward_increation test to ensure that the in-creation file only has it's final state before calling dc_send_msg. This checks the correct file data is sent out and not the preparing data, this fails with the chat.rs changes in #964 (reverted here to make this work again). Also fix the test to actually create the in-creation file in the blobdir. - Fix test_send_file_twice_unicode_filename_mangling to not use in-creation. It was not creating it's files in the blobdir and that is an error when using in-creation and it didn't seem it was trying to test something about the in-creation logic (which is tested in test_increation.py already). - Fix Message._msgtate code which presumably was not used before? - Rename `BlobObject::create_from_path` to `BlobObject::new_from_path`. All the `BlobObject::create*` calls now always create new files which is much more consistent. APIs should do what is obious.
77 lines
1.3 KiB
INI
77 lines
1.3 KiB
INI
[tox]
|
|
# make sure to update environment list in travis.yml and appveyor.yml
|
|
envlist =
|
|
py37
|
|
lint
|
|
auditwheels
|
|
|
|
[testenv]
|
|
commands =
|
|
pytest -n6 --reruns 2 --reruns-delay 5 -v -rsXx {posargs:tests}
|
|
# python tests/package_wheels.py {toxworkdir}/wheelhouse
|
|
passenv =
|
|
TRAVIS
|
|
DCC_RS_DEV
|
|
DCC_RS_TARGET
|
|
DCC_PY_LIVECONFIG
|
|
CARGO_TARGET_DIR
|
|
RUSTC_WRAPPER
|
|
deps =
|
|
pytest
|
|
pytest-rerunfailures
|
|
pytest-timeout
|
|
pytest-xdist
|
|
pdbpp
|
|
requests
|
|
|
|
[testenv:auditwheels]
|
|
skipsdist = True
|
|
deps = auditwheel
|
|
commands =
|
|
python tests/auditwheels.py {toxworkdir}/wheelhouse
|
|
|
|
[testenv:lint]
|
|
skipsdist = True
|
|
skip_install = True
|
|
deps =
|
|
flake8
|
|
# pygments required by rst-lint
|
|
pygments
|
|
restructuredtext_lint
|
|
commands =
|
|
flake8 src/deltachat
|
|
flake8 tests/
|
|
rst-lint --encoding 'utf-8' README.rst
|
|
|
|
[testenv:doc]
|
|
changedir=doc
|
|
deps =
|
|
sphinx==2.2.0
|
|
breathe
|
|
commands =
|
|
sphinx-build -Q -w toxdoc-warnings.log -b html . _build/html
|
|
|
|
|
|
[testenv:lintdoc]
|
|
skipsdist = True
|
|
usedevelop = True
|
|
deps =
|
|
{[testenv:lint]deps}
|
|
{[testenv:doc]deps}
|
|
commands =
|
|
{[testenv:lint]commands}
|
|
{[testenv:doc]commands}
|
|
|
|
|
|
|
|
[pytest]
|
|
addopts = -v -ra
|
|
python_files = tests/test_*.py
|
|
norecursedirs = .tox
|
|
xfail_strict=true
|
|
timeout = 60
|
|
timeout_method = thread
|
|
|
|
[flake8]
|
|
max-line-length = 120
|