CoverageData with no_disk does not update correctly · Issue #1323 · nedbat/coveragepy (original) (raw)
Describe the bug
A CoverageData constructed with no_disk=True
cannot be updated with another CoverageData. The operation succeeds but records nothing:
from coverage import CoverageData a = CoverageData('.foo')
a.add_arcs({'foo.py': {}})
a.measured_files()
{'foo.py'}
b = CoverageData(no_disk=True)
b.update(a)
b.measured_files()
set()
(This applies also for arcs etc., b
remains empty).
Expected behavior
The expected behaviour for no_disk=True
is the same as when no_disk
is left unspecified; after an update()
call we should see data in the updated CoverageData:
c = CoverageData() c.update(a)
c.measured_files() {'foo.py'}
To Reproduce
- What version of Python are you using? 3.9.7
- What version of coverage.py shows the problem? 6.3.1
- The output of
coverage debug sys
is helpful.
It's very long due to a tremendously long PYTHONPATH
, but perhaps this part is most relevant:
sqlite3_version: 2.6.0
sqlite3_sqlite_version: 3.36.0
sqlite3_temp_store: 0
sqlite3_compile_options: COMPILER=gcc-8.3.0; ENABLE_FTS4; ENABLE_FTS5
ENABLE_GEOPOLY; ENABLE_JSON1; ENABLE_MATH_FUNCTIONS
ENABLE_RTREE; MAX_MMAP_SIZE=17179869184; SYSTEM_MALLOC
THREADSAFE=1