docs: 补 README 能力章节、缺陷报告与两份设计说明
- README:新增「数据能力」四节(内容寻址去重 / 快照与时间旅行 / 完整性校验与签名 / 增量打包)与「发布到对象存储」一节,附实测对比表;重写「要不要用 --compress」 (结论从"别用"反转为"默认就该开")、「迁移旧格式」;修正项目结构与字段表 - BUG_REPORT.md:13 节,含 P0/P1 逐条分析、P2/P3 清单、五批后续追加的记录, 以及过程中被推翻的两处结论(第九节的压缩建议、P3-1 的 uv sync 判断) - docs/encryption-design.md:加密的设计说明——去重与随机 nonce 的冲突、 标准库没有密码学原语、以及现有 freq_blob 可作为每块附加数据的槽位 - docs/evidence-*.txt:各阶段的测试运行证据(修复前 / 修复后 / 双环境)
This commit is contained in:
@@ -0,0 +1,829 @@
|
||||
test_pack_missing_source_returns_nonzero (test_cli.CliFailureTest.test_pack_missing_source_returns_nonzero) ... FAIL
|
||||
test_pack_to_missing_output_directory_reports_clean_error (test_cli.CliFailureTest.test_pack_to_missing_output_directory_reports_clean_error) ... FAIL
|
||||
test_unpack_missing_db_returns_nonzero (test_cli.CliFailureTest.test_unpack_missing_db_returns_nonzero) ... FAIL
|
||||
test_unpack_missing_path_returns_nonzero (test_cli.CliFailureTest.test_unpack_missing_path_returns_nonzero) ... FAIL
|
||||
test_unpack_non_database_file_reports_clean_error (test_cli.CliFailureTest.test_unpack_non_database_file_reports_clean_error) ... FAIL
|
||||
test_exclude_prunes_directory_subtree (test_cli.CliPackTest.test_exclude_prunes_directory_subtree) ... FAIL
|
||||
test_exclude_supports_glob_patterns (test_cli.CliPackTest.test_exclude_supports_glob_patterns)
|
||||
P1-9: README 承诺 glob 语义,`*.log` 必须真的排除 .log 文件, ... FAIL
|
||||
test_pack_reports_file_count_matching_database (test_cli.CliPackTest.test_pack_reports_file_count_matching_database) ... ok
|
||||
test_pack_stores_every_file (test_cli.CliPackTest.test_pack_stores_every_file) ... FAIL
|
||||
test_full_roundtrip_via_cli (test_cli.CliUnpackTest.test_full_roundtrip_via_cli) ... FAIL
|
||||
test_ignore_timestamps_full_export_does_not_recurse (test_cli.CliUnpackTest.test_ignore_timestamps_full_export_does_not_recurse)
|
||||
P0-3: --ignore-timestamps 曾把 export_filesystem 赋成引用自身的 lambda。 ... FAIL
|
||||
test_ignore_timestamps_with_path_subdirectory (test_cli.CliUnpackTest.test_ignore_timestamps_with_path_subdirectory) ... FAIL
|
||||
test_list_root_only_shows_top_level (test_cli.CliUnpackTest.test_list_root_only_shows_top_level)
|
||||
P0-2: 根目录列表不能把整张表铺平。 ... ok
|
||||
test_path_exports_single_file (test_cli.CliUnpackTest.test_path_exports_single_file) ... ERROR
|
||||
test_path_exports_subdirectory_with_contents (test_cli.CliUnpackTest.test_path_exports_subdirectory_with_contents) ... FAIL
|
||||
test_rejects_old_schema_database_cleanly (test_cli.CliUnpackTest.test_rejects_old_schema_database_cleanly)
|
||||
P1-7: 旧格式库要给出明确提示,退出码非 0,且不能是 traceback。 ... FAIL
|
||||
test_duplicate_add_file_is_reported_and_keeps_first_content (test_core.AddFileConflictTest.test_duplicate_add_file_is_reported_and_keeps_first_content) ... FAIL
|
||||
test_directories_come_before_files (test_core.DirectoryListingTest.test_directories_come_before_files) ... FAIL
|
||||
test_leaf_directory_is_empty (test_core.DirectoryListingTest.test_leaf_directory_is_empty) ... FAIL
|
||||
test_nested_directory_lists_its_children (test_core.DirectoryListingTest.test_nested_directory_lists_its_children) ... FAIL
|
||||
test_paths_are_returned_as_dicts_with_datetime (test_core.DirectoryListingTest.test_paths_are_returned_as_dicts_with_datetime) ... ok
|
||||
test_root_lists_top_level_only (test_core.DirectoryListingTest.test_root_lists_top_level_only) ... FAIL
|
||||
test_subdirectory_lists_its_children (test_core.DirectoryListingTest.test_subdirectory_lists_its_children) ... FAIL
|
||||
test_export_directory_full_tree (test_core.ExportTest.test_export_directory_full_tree) ... Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 483, in export_file
|
||||
content = self.read_file(vfs_path)
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 278, in read_file
|
||||
algo = file_info["compress_algo"] or "none"
|
||||
~~~~~~~~~^^^^^^^^^^^^^^^^^
|
||||
KeyError: 'compress_algo'
|
||||
FAIL
|
||||
test_export_file_accepts_bare_filename (test_core.ExportTest.test_export_file_accepts_bare_filename)
|
||||
P1-6: local_path 没有目录部分时 dirname 为 '',不能抛 FileNotFoundError。 ... Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 480, in export_file
|
||||
os.makedirs(os.path.dirname(local_path), exist_ok=True)
|
||||
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "<frozen os>", line 228, in makedirs
|
||||
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: ''
|
||||
FAIL
|
||||
test_export_file_writes_exact_bytes (test_core.ExportTest.test_export_file_writes_exact_bytes) ... Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 483, in export_file
|
||||
content = self.read_file(vfs_path)
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 278, in read_file
|
||||
algo = file_info["compress_algo"] or "none"
|
||||
~~~~~~~~~^^^^^^^^^^^^^^^^^
|
||||
KeyError: 'compress_algo'
|
||||
FAIL
|
||||
test_export_filesystem_matches_tree (test_core.ExportTest.test_export_filesystem_matches_tree) ... Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 483, in export_file
|
||||
content = self.read_file(vfs_path)
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 278, in read_file
|
||||
algo = file_info["compress_algo"] or "none"
|
||||
~~~~~~~~~^^^^^^^^^^^^^^^^^
|
||||
KeyError: 'compress_algo'
|
||||
FAIL
|
||||
test_export_subdirectory_does_not_recurse_forever (test_core.ExportTest.test_export_subdirectory_does_not_recurse_forever)
|
||||
P0-2: list_directory 按 path 过滤时,导出 doc 会无限自我递归。 ... FAIL
|
||||
test_below_threshold_is_not_compressed (test_core.FileContentTest.test_below_threshold_is_not_compressed) ... ERROR
|
||||
test_compressible_file_uses_huffman (test_core.FileContentTest.test_compressible_file_uses_huffman) ... ERROR
|
||||
test_empty_file_roundtrip (test_core.FileContentTest.test_empty_file_roundtrip) ... ERROR
|
||||
test_file_size_recorded_matches_content (test_core.FileContentTest.test_file_size_recorded_matches_content) ... ERROR
|
||||
test_incompressible_file_falls_back_to_none (test_core.FileContentTest.test_incompressible_file_falls_back_to_none) ... ERROR
|
||||
test_read_file_offset_and_size (test_core.FileContentTest.test_read_file_offset_and_size) ... ERROR
|
||||
test_read_file_rejects_directory_and_missing_path (test_core.FileContentTest.test_read_file_rejects_directory_and_missing_path) ... ok
|
||||
test_small_file_roundtrip (test_core.FileContentTest.test_small_file_roundtrip) ... ERROR
|
||||
test_mk_dir_creates_directory (test_core.MkDirTest.test_mk_dir_creates_directory) ... E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py:319: DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
|
||||
cursor.execute(
|
||||
ok
|
||||
test_mk_dir_existing_raises_cleanly (test_core.MkDirTest.test_mk_dir_existing_raises_cleanly) ... ok
|
||||
test_mv_dir_does_not_touch_prefix_sibling (test_core.MoveAndRemoveTest.test_mv_dir_does_not_touch_prefix_sibling) ... FAIL
|
||||
test_mv_dir_into_new_parent_directory (test_core.MoveAndRemoveTest.test_mv_dir_into_new_parent_directory) ... ok
|
||||
test_mv_dir_rename_is_not_applied_twice (test_core.MoveAndRemoveTest.test_mv_dir_rename_is_not_applied_twice)
|
||||
P1-2: mv_dir("doc","doc_new") 的第二条 UPDATE 会再次命中已改名的目录自身。 ... FAIL
|
||||
test_mv_dir_root_creates_destination_and_fixes_parent_paths (test_core.MoveAndRemoveTest.test_mv_dir_root_creates_destination_and_fixes_parent_paths)
|
||||
P1-3: 把根目录整体移进 archive 时,archive 目录行必须存在, ... FAIL
|
||||
test_mv_dir_to_existing_destination_raises_and_keeps_source (test_core.MoveAndRemoveTest.test_mv_dir_to_existing_destination_raises_and_keeps_source) ... ok
|
||||
test_mv_dir_updates_children_parent_paths (test_core.MoveAndRemoveTest.test_mv_dir_updates_children_parent_paths) ... ok
|
||||
test_mv_file_updates_name_and_parent (test_core.MoveAndRemoveTest.test_mv_file_updates_name_and_parent) ... ok
|
||||
test_remove_directory_does_not_touch_prefix_sibling (test_core.MoveAndRemoveTest.test_remove_directory_does_not_touch_prefix_sibling)
|
||||
删除 doc 不能连带删掉 docs(LIKE 'doc%' 会把 docs 一起匹配上)。 ... FAIL
|
||||
test_remove_file_with_percent_is_not_a_wildcard (test_core.MoveAndRemoveTest.test_remove_file_with_percent_is_not_a_wildcard) ... ok
|
||||
test_remove_file_with_underscore_is_not_a_wildcard (test_core.MoveAndRemoveTest.test_remove_file_with_underscore_is_not_a_wildcard)
|
||||
文件名里的 _ 不能被当成 LIKE 的单字符通配符。 ... ok
|
||||
test_remove_missing_path_reports_error (test_core.MoveAndRemoveTest.test_remove_missing_path_reports_error) ... FAIL
|
||||
test_add_file_survives_close_without_further_commit (test_core.PersistenceTest.test_add_file_survives_close_without_further_commit) ... FAIL
|
||||
test_fresh_database_is_accepted (test_core.SchemaCompatibilityTest.test_fresh_database_is_accepted) ... ok
|
||||
test_non_sqlite_file_is_rejected (test_core.SchemaCompatibilityTest.test_non_sqlite_file_is_rejected) ... ok
|
||||
test_repository_sample_db_is_rejected (test_core.SchemaCompatibilityTest.test_repository_sample_db_is_rejected) ... FAIL
|
||||
test_synthesized_old_schema_db_is_rejected (test_core.SchemaCompatibilityTest.test_synthesized_old_schema_db_is_rejected) ... FAIL
|
||||
test_add_file_actually_stores_a_row (test_core.SchemaContractTest.test_add_file_actually_stores_a_row)
|
||||
add_file 之后库里必须真的有这条记录。 ... FAIL
|
||||
test_expected_columns_exist (test_core.SchemaContractTest.test_expected_columns_exist) ... FAIL
|
||||
test_bad_magic_rejected (test_huffman.HeaderValidationTest.test_bad_magic_rejected) ... ok
|
||||
test_too_short_blob_rejected (test_huffman.HeaderValidationTest.test_too_short_blob_rejected) ... ok
|
||||
test_truncated_payload_rejected (test_huffman.HeaderValidationTest.test_truncated_payload_rejected) ... FAIL
|
||||
test_wrong_freq_blob_size_rejected (test_huffman.HeaderValidationTest.test_wrong_freq_blob_size_rejected) ... ok
|
||||
test_all_256_byte_values (test_huffman.RoundTripTest.test_all_256_byte_values) ... ok
|
||||
test_binary_with_nulls_and_high_bytes (test_huffman.RoundTripTest.test_binary_with_nulls_and_high_bytes) ... ok
|
||||
test_empty (test_huffman.RoundTripTest.test_empty) ... ok
|
||||
test_incompressible_random (test_huffman.RoundTripTest.test_incompressible_random) ... ok
|
||||
test_just_above_core_threshold (test_huffman.RoundTripTest.test_just_above_core_threshold) ... ok
|
||||
test_repetitive_text_compresses (test_huffman.RoundTripTest.test_repetitive_text_compresses) ... FAIL
|
||||
test_single_byte (test_huffman.RoundTripTest.test_single_byte) ... ok
|
||||
test_single_symbol_repeated (test_huffman.RoundTripTest.test_single_symbol_repeated) ... ok
|
||||
test_two_symbols (test_huffman.RoundTripTest.test_two_symbols) ... ok
|
||||
test_utf8_chinese (test_huffman.RoundTripTest.test_utf8_chinese) ... ERROR
|
||||
test_compression_reduces_database_size (test_roundtrip.RoundTripTest.test_compression_reduces_database_size) ... E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py:124: DeprecationWarning: The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes
|
||||
cursor.execute(
|
||||
FAIL
|
||||
test_every_source_file_is_stored (test_roundtrip.RoundTripTest.test_every_source_file_is_stored)
|
||||
P0-1:打包后库里必须有和源目录一一对应的文件记录。 ... FAIL
|
||||
test_metadata_counts_match_database (test_roundtrip.RoundTripTest.test_metadata_counts_match_database)
|
||||
P1-5:上报的统计数字必须来自真实入库的数据,而不是遍历计数。 ... FAIL
|
||||
test_packed_database_contains_no_duplicate_paths (test_roundtrip.RoundTripTest.test_packed_database_contains_no_duplicate_paths) ... ok
|
||||
test_roundtrip_with_compression (test_roundtrip.RoundTripTest.test_roundtrip_with_compression) ... E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py:242: ResourceWarning: unclosed database in <sqlite3.Connection object at 0x000002E9E0ACFC40>
|
||||
parsed_row["created_time"].replace("Z", "+00:00")
|
||||
ResourceWarning: Enable tracemalloc to get the object allocation traceback
|
||||
FAIL
|
||||
test_roundtrip_with_ignore_timestamps (test_roundtrip.RoundTripTest.test_roundtrip_with_ignore_timestamps) ... FAIL
|
||||
test_roundtrip_without_compression (test_roundtrip.RoundTripTest.test_roundtrip_without_compression) ... FAIL
|
||||
|
||||
======================================================================
|
||||
ERROR: test_path_exports_single_file (test_cli.CliUnpackTest.test_path_exports_single_file)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 184, in test_path_exports_single_file
|
||||
with open(os.path.join(out, "top.txt"), "rb") as f:
|
||||
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\chakcy\\AppData\\Local\\Temp\\svfs_test_kelch2hu\\out\\top.txt'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_below_threshold_is_not_compressed (test_core.FileContentTest.test_below_threshold_is_not_compressed)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 116, in test_below_threshold_is_not_compressed
|
||||
vfs, content = self._write_and_read(data, compress=True)
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 80, in _write_and_read
|
||||
return vfs, vfs.read_file(rel_path)
|
||||
~~~~~~~~~~~~~^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 273, in read_file
|
||||
raise FileNotFoundError(f"文件不存在: {path}")
|
||||
FileNotFoundError: 文件不存在: data.bin
|
||||
|
||||
======================================================================
|
||||
ERROR: test_compressible_file_uses_huffman (test_core.FileContentTest.test_compressible_file_uses_huffman)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 93, in test_compressible_file_uses_huffman
|
||||
vfs, content = self._write_and_read(data, compress=True)
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 80, in _write_and_read
|
||||
return vfs, vfs.read_file(rel_path)
|
||||
~~~~~~~~~~~~~^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 273, in read_file
|
||||
raise FileNotFoundError(f"文件不存在: {path}")
|
||||
FileNotFoundError: 文件不存在: data.bin
|
||||
|
||||
======================================================================
|
||||
ERROR: test_empty_file_roundtrip (test_core.FileContentTest.test_empty_file_roundtrip)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 88, in test_empty_file_roundtrip
|
||||
_, content = self._write_and_read(b"")
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 80, in _write_and_read
|
||||
return vfs, vfs.read_file(rel_path)
|
||||
~~~~~~~~~~~~~^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 273, in read_file
|
||||
raise FileNotFoundError(f"文件不存在: {path}")
|
||||
FileNotFoundError: 文件不存在: data.bin
|
||||
|
||||
======================================================================
|
||||
ERROR: test_file_size_recorded_matches_content (test_core.FileContentTest.test_file_size_recorded_matches_content)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 122, in test_file_size_recorded_matches_content
|
||||
vfs, _ = self._write_and_read(data)
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 80, in _write_and_read
|
||||
return vfs, vfs.read_file(rel_path)
|
||||
~~~~~~~~~~~~~^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 273, in read_file
|
||||
raise FileNotFoundError(f"文件不存在: {path}")
|
||||
FileNotFoundError: 文件不存在: data.bin
|
||||
|
||||
======================================================================
|
||||
ERROR: test_incompressible_file_falls_back_to_none (test_core.FileContentTest.test_incompressible_file_falls_back_to_none)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 106, in test_incompressible_file_falls_back_to_none
|
||||
vfs, content = self._write_and_read(data, compress=True)
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 80, in _write_and_read
|
||||
return vfs, vfs.read_file(rel_path)
|
||||
~~~~~~~~~~~~~^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 273, in read_file
|
||||
raise FileNotFoundError(f"文件不存在: {path}")
|
||||
FileNotFoundError: 文件不存在: data.bin
|
||||
|
||||
======================================================================
|
||||
ERROR: test_read_file_offset_and_size (test_core.FileContentTest.test_read_file_offset_and_size)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 126, in test_read_file_offset_and_size
|
||||
vfs, _ = self._write_and_read(b"0123456789")
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 80, in _write_and_read
|
||||
return vfs, vfs.read_file(rel_path)
|
||||
~~~~~~~~~~~~~^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 273, in read_file
|
||||
raise FileNotFoundError(f"文件不存在: {path}")
|
||||
FileNotFoundError: 文件不存在: data.bin
|
||||
|
||||
======================================================================
|
||||
ERROR: test_small_file_roundtrip (test_core.FileContentTest.test_small_file_roundtrip)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 83, in test_small_file_roundtrip
|
||||
vfs, content = self._write_and_read(b"hello sqlite vfs")
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 80, in _write_and_read
|
||||
return vfs, vfs.read_file(rel_path)
|
||||
~~~~~~~~~~~~~^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\core.py", line 273, in read_file
|
||||
raise FileNotFoundError(f"文件不存在: {path}")
|
||||
FileNotFoundError: 文件不存在: data.bin
|
||||
|
||||
======================================================================
|
||||
ERROR: test_utf8_chinese (test_huffman.RoundTripTest.test_utf8_chinese)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_huffman.py", line 78, in test_utf8_chinese
|
||||
self.assert_roundtrip("中文内容,测试哈夫曼编码是否无损。\n" * 200, "中文")
|
||||
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_huffman.py", line 24, in assert_roundtrip
|
||||
freq_blob, compressed_blob = compress_bytes(data)
|
||||
~~~~~~~~~~~~~~^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\src\sqlite_vfs\huffman.py", line 128, in compress_bytes
|
||||
freq[b] += 1
|
||||
~~~~^^^
|
||||
TypeError: list indices must be integers or slices, not str
|
||||
|
||||
======================================================================
|
||||
FAIL: test_pack_missing_source_returns_nonzero (test_cli.CliFailureTest.test_pack_missing_source_returns_nonzero)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 49, in test_pack_missing_source_returns_nonzero
|
||||
self.assertNotEqual(0, result.returncode, "源目录不存在却返回了成功")
|
||||
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 0 == 0 : 源目录不存在却返回了成功
|
||||
|
||||
======================================================================
|
||||
FAIL: test_pack_to_missing_output_directory_reports_clean_error (test_cli.CliFailureTest.test_pack_to_missing_output_directory_reports_clean_error)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 61, in test_pack_to_missing_output_directory_reports_clean_error
|
||||
self.assertNotIn("Traceback", helpers.cli_output(result))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 'Traceback' unexpectedly found in 'Traceback (most recent call last):\n File "<frozen runpy>", line 198, in _run_module_as_main\n File "<frozen runpy>", line 88, in _run_code\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\packer.py", line 40, in <module>\n pack()\n ~~~~^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\packer.py", line 28, in pack\n sqlite_vfs=SQLiteVFS(args.output_db, args.compress),\n ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\core.py", line 20, in __init__\n self.connect()\n ~~~~~~~~~~~~^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\core.py", line 24, in connect\n self.conn = sqlite3.connect(self.db_path)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^\nsqlite3.OperationalError: unable to open database file\n'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_unpack_missing_db_returns_nonzero (test_cli.CliFailureTest.test_unpack_missing_db_returns_nonzero)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 54, in test_unpack_missing_db_returns_nonzero
|
||||
self.assertNotEqual(0, result.returncode, "数据库不存在却返回了成功")
|
||||
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 0 == 0 : 数据库不存在却返回了成功
|
||||
|
||||
======================================================================
|
||||
FAIL: test_unpack_missing_path_returns_nonzero (test_cli.CliFailureTest.test_unpack_missing_path_returns_nonzero)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 73, in test_unpack_missing_path_returns_nonzero
|
||||
self.assertNotEqual(0, result.returncode, "导出不存在的路径却返回了成功")
|
||||
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 0 == 0 : 导出不存在的路径却返回了成功
|
||||
|
||||
======================================================================
|
||||
FAIL: test_unpack_non_database_file_reports_clean_error (test_cli.CliFailureTest.test_unpack_non_database_file_reports_clean_error)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 68, in test_unpack_non_database_file_reports_clean_error
|
||||
self.assertNotIn("Traceback", helpers.cli_output(result))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 'Traceback' unexpectedly found in 'Traceback (most recent call last):\n File "<frozen runpy>", line 198, in _run_module_as_main\n File "<frozen runpy>", line 88, in _run_code\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\unpacker.py", line 77, in <module>\n unpack()\n ~~~~~~^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\unpacker.py", line 34, in unpack\n unpacker = FolderUnpacker(sqlite_vfs=SQLiteVFS(args.db_file))\n ~~~~~~~~~^^^^^^^^^^^^^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\core.py", line 20, in __init__\n self.connect()\n ~~~~~~~~~~~~^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\core.py", line 26, in connect\n self._create_tables()\n ~~~~~~~~~~~~~~~~~~~^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\core.py", line 72, in _create_tables\n cursor.execute(\n ~~~~~~~~~~~~~~^\n """\n ^^^\n ...<7 lines>...\n """\n ^^^\n )\n ^\nsqlite3.DatabaseError: file is not a database\n'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_exclude_prunes_directory_subtree (test_cli.CliPackTest.test_exclude_prunes_directory_subtree)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 123, in test_exclude_prunes_directory_subtree
|
||||
self.assertEqual({"keep.txt"}, set(helpers.stored_files(vfs)))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: Items in the first set but not the second:
|
||||
'keep.txt'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_exclude_supports_glob_patterns (test_cli.CliPackTest.test_exclude_supports_glob_patterns)
|
||||
P1-9: README 承诺 glob 语义,`*.log` 必须真的排除 .log 文件,
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 106, in test_exclude_supports_glob_patterns
|
||||
self.assertEqual(
|
||||
~~~~~~~~~~~~~~~~^
|
||||
{"keep.txt", "catalog.txt", "sub/keep2.txt"}, set(helpers.stored_files(vfs))
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: Items in the first set but not the second:
|
||||
'catalog.txt'
|
||||
'sub/keep2.txt'
|
||||
'keep.txt'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_pack_stores_every_file (test_cli.CliPackTest.test_pack_stores_every_file)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 86, in test_pack_stores_every_file
|
||||
self.assertEqual(expected, set(helpers.stored_files(vfs)))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: Items in the first set but not the second:
|
||||
'sub/inner.txt'
|
||||
'top.txt'
|
||||
'sub/deep/leaf.bin'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_full_roundtrip_via_cli (test_cli.CliUnpackTest.test_full_roundtrip_via_cli)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 152, in test_full_roundtrip_via_cli
|
||||
helpers.assert_tree_equal(self, expected, helpers.read_tree(out))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 3 项,例如: ['sub/deep/leaf.bin', 'sub/in[1427 chars]ir']"
|
||||
Diff is 1482 characters long. Set self.maxDiff to None to see it.
|
||||
|
||||
======================================================================
|
||||
FAIL: test_ignore_timestamps_full_export_does_not_recurse (test_cli.CliUnpackTest.test_ignore_timestamps_full_export_does_not_recurse)
|
||||
P0-3: --ignore-timestamps 曾把 export_filesystem 赋成引用自身的 lambda。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 194, in test_ignore_timestamps_full_export_does_not_recurse
|
||||
self.assertNotIn("RecursionError", output)
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 'RecursionError' unexpectedly found in '数据库状态: 数据库正常,共有 6 个文件/目录,根目录下有 3 个项目\nTraceback (most recent call last):\n File "<frozen runpy>", line 198, in _run_module_as_main\n File "<frozen runpy>", line 88, in _run_code\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\unpacker.py", line 77, in <module>\n unpack()\n ~~~~~~^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\unpacker.py", line 70, in unpack\n unpacker.unpack_filesystem(args.export_folder)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\folder_unpacker.py", line 60, in unpack_filesystem\n return self.sqlite_vfs.export_filesystem(export_folder)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\unpacker.py", line 66, in <lambda>\n lambda export_root: unpacker.sqlite_vfs.export_filesystem(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n export_root\n ^^^^^^^^^^^\n )\n ^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\unpacker.py", line 66, in <lambda>\n lambda export_root: unpacker.sqlite_vfs.export_filesystem(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n export_root\n ^^^^^^^^^^^\n )\n ^\n File "E:\\HuaweiMoveData\\Users\\chakcy\\Desktop\\新建文件夹\\sqlite_vfs\\src\\sqlite_vfs\\cli\\unpacker.py", line 66, in <lambda>\n lambda export_root: unpacker.sqlite_vfs.export_filesystem(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n export_root\n ^^^^^^^^^^^\n )\n ^\n [Previous line repeated 992 more times]\nRecursionError: maximum recursion depth exceeded\n'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_ignore_timestamps_with_path_subdirectory (test_cli.CliUnpackTest.test_ignore_timestamps_with_path_subdirectory)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 215, in test_ignore_timestamps_with_path_subdirectory
|
||||
helpers.assert_tree_equal(self, expected, helpers.read_tree(os.path.join(out, "doc")))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 3 项,例如: ['a.txt', 'sub', 'sub/b.txt'][536 chars]oc']"
|
||||
- 无差异
|
||||
+ 缺失 3 项,例如: ['a.txt', 'sub', 'sub/b.txt']
|
||||
+ 多出 991 项,例如: ['doc', 'doc/doc', 'doc/doc/doc', 'doc/doc/doc/doc', 'doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc']
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_path_exports_subdirectory_with_contents (test_cli.CliUnpackTest.test_path_exports_subdirectory_with_contents)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 177, in test_path_exports_subdirectory_with_contents
|
||||
helpers.assert_tree_equal(self, expected, helpers.read_tree(os.path.join(out, "doc")))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 3 项,例如: ['a.txt', 'sub', 'sub/b.txt'][536 chars]oc']"
|
||||
- 无差异
|
||||
+ 缺失 3 项,例如: ['a.txt', 'sub', 'sub/b.txt']
|
||||
+ 多出 991 项,例如: ['doc', 'doc/doc', 'doc/doc/doc', 'doc/doc/doc/doc', 'doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc']
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_rejects_old_schema_database_cleanly (test_cli.CliUnpackTest.test_rejects_old_schema_database_cleanly)
|
||||
P1-7: 旧格式库要给出明确提示,退出码非 0,且不能是 traceback。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_cli.py", line 222, in test_rejects_old_schema_database_cleanly
|
||||
self.assertNotEqual(0, result.returncode)
|
||||
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 0 == 0
|
||||
|
||||
======================================================================
|
||||
FAIL: test_duplicate_add_file_is_reported_and_keeps_first_content (test_core.AddFileConflictTest.test_duplicate_add_file_is_reported_and_keeps_first_content)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 368, in test_duplicate_add_file_is_reported_and_keeps_first_content
|
||||
self.assertTrue(first, "首次写入应当成功")
|
||||
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: None is not true : 首次写入应当成功
|
||||
|
||||
======================================================================
|
||||
FAIL: test_directories_come_before_files (test_core.DirectoryListingTest.test_directories_come_before_files)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 182, in test_directories_come_before_files
|
||||
self.assertEqual([1, 0], [row["is_directory"] for row in rows])
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: Lists differ: [1, 0] != [1]
|
||||
|
||||
First list contains 1 additional elements.
|
||||
First extra element 1:
|
||||
0
|
||||
|
||||
- [1, 0]
|
||||
+ [1]
|
||||
|
||||
======================================================================
|
||||
FAIL: test_leaf_directory_is_empty (test_core.DirectoryListingTest.test_leaf_directory_is_empty)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 186, in test_leaf_directory_is_empty
|
||||
self.assertEqual([], vfs.list_directory("docs"))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: Lists differ: [] != [{'id': 2, 'path': 'docs', 'name': 'docs',[177 chars]ne'}]
|
||||
|
||||
Second list contains 1 additional elements.
|
||||
First extra element 0:
|
||||
{'id': 2, 'path': 'docs', 'name': 'docs', 'parent_path': '', 'is_directory': 1, 'file_size': 0, 'created_time': None, 'modified_time': None, 'permissions': 644, 'content': None, 'freq_blob': None, 'compresse_algo': 'none'}
|
||||
|
||||
- []
|
||||
+ [{'compresse_algo': 'none',
|
||||
+ 'content': None,
|
||||
+ 'created_time': None,
|
||||
+ 'file_size': 0,
|
||||
+ 'freq_blob': None,
|
||||
+ 'id': 2,
|
||||
+ 'is_directory': 1,
|
||||
+ 'modified_time': None,
|
||||
+ 'name': 'docs',
|
||||
+ 'parent_path': '',
|
||||
+ 'path': 'docs',
|
||||
+ 'permissions': 644}]
|
||||
|
||||
======================================================================
|
||||
FAIL: test_nested_directory_lists_its_children (test_core.DirectoryListingTest.test_nested_directory_lists_its_children)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 177, in test_nested_directory_lists_its_children
|
||||
self.assertEqual(["doc/sub/b.txt"], paths)
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: Lists differ: ['doc/sub/b.txt'] != ['doc/sub']
|
||||
|
||||
First differing element 0:
|
||||
'doc/sub/b.txt'
|
||||
'doc/sub'
|
||||
|
||||
- ['doc/sub/b.txt']
|
||||
? ------
|
||||
|
||||
+ ['doc/sub']
|
||||
|
||||
======================================================================
|
||||
FAIL: test_root_lists_top_level_only (test_core.DirectoryListingTest.test_root_lists_top_level_only)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 167, in test_root_lists_top_level_only
|
||||
self.assertEqual(["doc", "docs", "top.txt"], paths)
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: Lists differ: ['doc', 'docs', 'top.txt'] != ['doc', 'doc/a.txt', 'doc/sub', 'doc/sub/b.txt', 'doc[23 chars]txt']
|
||||
|
||||
First differing element 1:
|
||||
'docs'
|
||||
'doc/a.txt'
|
||||
|
||||
Second list contains 4 additional elements.
|
||||
First extra element 3:
|
||||
'doc/sub/b.txt'
|
||||
|
||||
- ['doc', 'docs', 'top.txt']
|
||||
+ ['doc',
|
||||
+ 'doc/a.txt',
|
||||
+ 'doc/sub',
|
||||
+ 'doc/sub/b.txt',
|
||||
+ 'docs',
|
||||
+ 'docs/c.txt',
|
||||
+ 'top.txt']
|
||||
|
||||
======================================================================
|
||||
FAIL: test_subdirectory_lists_its_children (test_core.DirectoryListingTest.test_subdirectory_lists_its_children)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 172, in test_subdirectory_lists_its_children
|
||||
self.assertEqual(["doc/a.txt", "doc/sub"], paths)
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: Lists differ: ['doc/a.txt', 'doc/sub'] != ['doc']
|
||||
|
||||
First differing element 0:
|
||||
'doc/a.txt'
|
||||
'doc'
|
||||
|
||||
First list contains 1 additional elements.
|
||||
First extra element 1:
|
||||
'doc/sub'
|
||||
|
||||
- ['doc/a.txt', 'doc/sub']
|
||||
+ ['doc']
|
||||
|
||||
======================================================================
|
||||
FAIL: test_export_directory_full_tree (test_core.ExportTest.test_export_directory_full_tree)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 432, in test_export_directory_full_tree
|
||||
helpers.assert_tree_equal(self, expected, helpers.read_tree(out))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 4 项,例如: ['doc/a.txt', 'doc/sub', 'doc[620 chars]oc']"
|
||||
Diff is 675 characters long. Set self.maxDiff to None to see it.
|
||||
|
||||
======================================================================
|
||||
FAIL: test_export_file_accepts_bare_filename (test_core.ExportTest.test_export_file_accepts_bare_filename)
|
||||
P1-6: local_path 没有目录部分时 dirname 为 '',不能抛 FileNotFoundError。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 413, in test_export_file_accepts_bare_filename
|
||||
self.assertTrue(ok, "导出到当前目录下的裸文件名应当成功")
|
||||
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: False is not true : 导出到当前目录下的裸文件名应当成功
|
||||
|
||||
======================================================================
|
||||
FAIL: test_export_file_writes_exact_bytes (test_core.ExportTest.test_export_file_writes_exact_bytes)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 401, in test_export_file_writes_exact_bytes
|
||||
self.assertTrue(vfs.export_file("top.txt", target))
|
||||
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: False is not true
|
||||
|
||||
======================================================================
|
||||
FAIL: test_export_filesystem_matches_tree (test_core.ExportTest.test_export_filesystem_matches_tree)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 457, in test_export_filesystem_matches_tree
|
||||
helpers.assert_tree_equal(self, expected, helpers.read_tree(out))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 4 项,例如: ['doc/a.txt', 'doc/sub', 'doc[620 chars]oc']"
|
||||
Diff is 675 characters long. Set self.maxDiff to None to see it.
|
||||
|
||||
======================================================================
|
||||
FAIL: test_export_subdirectory_does_not_recurse_forever (test_core.ExportTest.test_export_subdirectory_does_not_recurse_forever)
|
||||
P0-2: list_directory 按 path 过滤时,导出 doc 会无限自我递归。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 442, in test_export_subdirectory_does_not_recurse_forever
|
||||
helpers.assert_tree_equal(self, expected, helpers.read_tree(out))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 3 项,例如: ['a.txt', 'sub', 'sub/b.txt'][536 chars]oc']"
|
||||
- 无差异
|
||||
+ 缺失 3 项,例如: ['a.txt', 'sub', 'sub/b.txt']
|
||||
+ 多出 980 项,例如: ['doc', 'doc/doc', 'doc/doc/doc', 'doc/doc/doc/doc', 'doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc', 'doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc/doc']
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_mv_dir_does_not_touch_prefix_sibling (test_core.MoveAndRemoveTest.test_mv_dir_does_not_touch_prefix_sibling)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 277, in test_mv_dir_does_not_touch_prefix_sibling
|
||||
self.assertIn("docs", helpers.all_paths(vfs))
|
||||
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 'docs' not found in {'doc_new/sub/b.txt', 'top.txt', 'doc_new/a.txt', 'doc_new/sub', 'doc_news/c.txt', 'doc_new_new', 'doc_news'}
|
||||
|
||||
======================================================================
|
||||
FAIL: test_mv_dir_rename_is_not_applied_twice (test_core.MoveAndRemoveTest.test_mv_dir_rename_is_not_applied_twice)
|
||||
P1-2: mv_dir("doc","doc_new") 的第二条 UPDATE 会再次命中已改名的目录自身。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 261, in test_mv_dir_rename_is_not_applied_twice
|
||||
self.assertEqual(
|
||||
~~~~~~~~~~~~~~~~^
|
||||
{
|
||||
^
|
||||
...<8 lines>...
|
||||
helpers.all_paths(vfs),
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: Items in the first set but not the second:
|
||||
'docs/c.txt'
|
||||
'docs'
|
||||
'doc_new'
|
||||
Items in the second set but not the first:
|
||||
'doc_new_new'
|
||||
'doc_news/c.txt'
|
||||
'doc_news'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_mv_dir_root_creates_destination_and_fixes_parent_paths (test_core.MoveAndRemoveTest.test_mv_dir_root_creates_destination_and_fixes_parent_paths)
|
||||
P1-3: 把根目录整体移进 archive 时,archive 目录行必须存在,
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 303, in test_mv_dir_root_creates_destination_and_fixes_parent_paths
|
||||
self.assertIn("archive", parents, "目标目录 archive 没有对应的目录行")
|
||||
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 'archive' not found in {'archive/doc': 'archive/', 'archive/doc/a.txt': 'archive/doc', 'archive/doc/sub': 'archive/doc', 'archive/doc/sub/b.txt': 'archive/doc/sub', 'archive/docs': 'archive/', 'archive/docs/c.txt': 'archive/docs', 'archive/top.txt': 'archive'} : 目标目录 archive 没有对应的目录行
|
||||
|
||||
======================================================================
|
||||
FAIL: test_remove_directory_does_not_touch_prefix_sibling (test_core.MoveAndRemoveTest.test_remove_directory_does_not_touch_prefix_sibling)
|
||||
删除 doc 不能连带删掉 docs(LIKE 'doc%' 会把 docs 一起匹配上)。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 224, in test_remove_directory_does_not_touch_prefix_sibling
|
||||
self.assertEqual(
|
||||
~~~~~~~~~~~~~~~~^
|
||||
{"docs", "docs/c.txt", "top.txt"},
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
paths,
|
||||
^^^^^^
|
||||
"删除 doc 误伤了 docs",
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: Items in the first set but not the second:
|
||||
'docs/c.txt'
|
||||
'docs' : 删除 doc 误伤了 docs
|
||||
|
||||
======================================================================
|
||||
FAIL: test_remove_missing_path_reports_error (test_core.MoveAndRemoveTest.test_remove_missing_path_reports_error)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 253, in test_remove_missing_path_reports_error
|
||||
with self.assertRaises(FileNotFoundError):
|
||||
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: FileNotFoundError not raised
|
||||
|
||||
======================================================================
|
||||
FAIL: test_add_file_survives_close_without_further_commit (test_core.PersistenceTest.test_add_file_survives_close_without_further_commit)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 65, in test_add_file_survives_close_without_further_commit
|
||||
self.assertTrue(
|
||||
~~~~~~~~~~~~~~~^
|
||||
reopened.exists("x.bin"),
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
"add_file 之后直接 close(),数据丢失——事务没有提交",
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: False is not true : add_file 之后直接 close(),数据丢失——事务没有提交
|
||||
|
||||
======================================================================
|
||||
FAIL: test_repository_sample_db_is_rejected (test_core.SchemaCompatibilityTest.test_repository_sample_db_is_rejected)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 480, in test_repository_sample_db_is_rejected
|
||||
self.fail("core 没有定义 VFSFormatError 一类的异常")
|
||||
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: core 没有定义 VFSFormatError 一类的异常
|
||||
|
||||
======================================================================
|
||||
FAIL: test_synthesized_old_schema_db_is_rejected (test_core.SchemaCompatibilityTest.test_synthesized_old_schema_db_is_rejected)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 466, in test_synthesized_old_schema_db_is_rejected
|
||||
self.fail(
|
||||
~~~~~~~~~^
|
||||
"core 没有定义 VFSFormatError 一类的异常,"
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
"调用方无法区分「旧格式库」与「正常库」,只能在导出阶段看到一堆导出失败"
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: core 没有定义 VFSFormatError 一类的异常,调用方无法区分「旧格式库」与「正常库」,只能在导出阶段看到一堆导出失败
|
||||
|
||||
======================================================================
|
||||
FAIL: test_add_file_actually_stores_a_row (test_core.SchemaContractTest.test_add_file_actually_stores_a_row)
|
||||
add_file 之后库里必须真的有这条记录。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 47, in test_add_file_actually_stores_a_row
|
||||
self.assertTrue(vfs.exists("input.bin"), "add_file 没有把文件写进数据库")
|
||||
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: False is not true : add_file 没有把文件写进数据库
|
||||
|
||||
======================================================================
|
||||
FAIL: test_expected_columns_exist (test_core.SchemaContractTest.test_expected_columns_exist)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_core.py", line 32, in test_expected_columns_exist
|
||||
self.assertIn(name, columns, f"files 表缺少列 {name}")
|
||||
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 'compress_algo' not found in {'content', 'permissions', 'id', 'modified_time', 'compresse_algo', 'is_directory', 'file_size', 'freq_blob', 'created_time', 'name', 'parent_path', 'path'} : files 表缺少列 compress_algo
|
||||
|
||||
======================================================================
|
||||
FAIL: test_truncated_payload_rejected (test_huffman.HeaderValidationTest.test_truncated_payload_rejected)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_huffman.py", line 112, in test_truncated_payload_rejected
|
||||
with self.assertRaises(ValueError) as ctx:
|
||||
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
|
||||
AssertionError: ValueError not raised
|
||||
|
||||
======================================================================
|
||||
FAIL: test_repetitive_text_compresses (test_huffman.RoundTripTest.test_repetitive_text_compresses)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_huffman.py", line 71, in test_repetitive_text_compresses
|
||||
self.assertLess(
|
||||
~~~~~~~~~~~~~~~^
|
||||
len(compressed_blob),
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
len(data) // 2,
|
||||
^^^^^^^^^^^^^^^
|
||||
"高度重复的文本应当被显著压缩",
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: 50263 not less than 45000 : 高度重复的文本应当被显著压缩
|
||||
|
||||
======================================================================
|
||||
FAIL: test_compression_reduces_database_size (test_roundtrip.RoundTripTest.test_compression_reduces_database_size)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 112, in test_compression_reduces_database_size
|
||||
self.assertLess(
|
||||
~~~~~~~~~~~~~~~^
|
||||
compressed_size,
|
||||
^^^^^^^^^^^^^^^^
|
||||
plain_size,
|
||||
^^^^^^^^^^^
|
||||
"源目录里有大量重复文本,启用压缩后数据库应当变小",
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: 32768 not less than 32768 : 源目录里有大量重复文本,启用压缩后数据库应当变小
|
||||
|
||||
======================================================================
|
||||
FAIL: test_every_source_file_is_stored (test_roundtrip.RoundTripTest.test_every_source_file_is_stored)
|
||||
P0-1:打包后库里必须有和源目录一一对应的文件记录。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 77, in test_every_source_file_is_stored
|
||||
self.assertEqual(
|
||||
~~~~~~~~~~~~~~~~^
|
||||
"无差异",
|
||||
^^^^^^^^^
|
||||
helpers.diff_trees({p: None for p in expected}, {p: None for p in stored}),
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
)
|
||||
^
|
||||
AssertionError: '无差异' != "缺失 12 项,例如: ['below_threshold.bin', 'com[184 chars]xt']"
|
||||
- 无差异
|
||||
+ 缺失 12 项,例如: ['below_threshold.bin', 'compressible.txt', 'doc/a.txt', 'docs/b.txt', 'empty.txt', 'one_byte.bin', 'random.bin', 'sub/deep/deeper/nested.txt', 'sub/percent%name_.txt', 'sub/space name.txt', 'sub/中文名.txt', 'top.txt']
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_metadata_counts_match_database (test_roundtrip.RoundTripTest.test_metadata_counts_match_database)
|
||||
P1-5:上报的统计数字必须来自真实入库的数据,而不是遍历计数。
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 94, in test_metadata_counts_match_database
|
||||
self.assertEqual(source_count, stored_count, "入库文件数 ≠ 源文件数")
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: 12 != 0 : 入库文件数 ≠ 源文件数
|
||||
|
||||
======================================================================
|
||||
FAIL: test_roundtrip_with_compression (test_roundtrip.RoundTripTest.test_roundtrip_with_compression)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 63, in test_roundtrip_with_compression
|
||||
self._assert_lossless(src, db)
|
||||
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 55, in _assert_lossless
|
||||
helpers.assert_tree_equal(self, expected_tree(build_spec()), helpers.read_tree(out))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 12 项,例如: ['below_threshold.bin', 'com[725 chars]oc']"
|
||||
Diff is 780 characters long. Set self.maxDiff to None to see it.
|
||||
|
||||
======================================================================
|
||||
FAIL: test_roundtrip_with_ignore_timestamps (test_roundtrip.RoundTripTest.test_roundtrip_with_ignore_timestamps)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 67, in test_roundtrip_with_ignore_timestamps
|
||||
self._assert_lossless(src, db, ignore_timestamps=True)
|
||||
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 55, in _assert_lossless
|
||||
helpers.assert_tree_equal(self, expected_tree(build_spec()), helpers.read_tree(out))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 12 项,例如: ['below_threshold.bin', 'com[725 chars]oc']"
|
||||
Diff is 780 characters long. Set self.maxDiff to None to see it.
|
||||
|
||||
======================================================================
|
||||
FAIL: test_roundtrip_without_compression (test_roundtrip.RoundTripTest.test_roundtrip_without_compression)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 59, in test_roundtrip_without_compression
|
||||
self._assert_lossless(src, db)
|
||||
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\test_roundtrip.py", line 55, in _assert_lossless
|
||||
helpers.assert_tree_equal(self, expected_tree(build_spec()), helpers.read_tree(out))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\HuaweiMoveData\Users\chakcy\Desktop\新建文件夹\sqlite_vfs\tests\helpers.py", line 136, in assert_tree_equal
|
||||
case.assertEqual("无差异", diff_trees(expected, actual))
|
||||
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
AssertionError: '无差异' != "缺失 12 项,例如: ['below_threshold.bin', 'com[725 chars]oc']"
|
||||
Diff is 780 characters long. Set self.maxDiff to None to see it.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 77 tests in 175.700s
|
||||
|
||||
FAILED (failures=42, errors=9)
|
||||
EXIT=1
|
||||
Reference in New Issue
Block a user