File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -840,6 +840,7 @@ def test_run_analysis_bundle_manifest_hashes_local_inputs_without_absolute_paths
840840 out_dir = root / "report"
841841 input_path .write_text (content , encoding = "utf-8" )
842842 expected_hash = __import__ ("hashlib" ).sha256 (input_path .read_bytes ()).hexdigest ()
843+ expected_size = input_path .stat ().st_size
843844
844845 run_analysis (
845846 AnalysisOptions (
@@ -851,7 +852,7 @@ def test_run_analysis_bundle_manifest_hashes_local_inputs_without_absolute_paths
851852
852853 self .assertEqual (manifest ["inputs" ][0 ]["name" ], "access.log" )
853854 self .assertEqual (manifest ["inputs" ][0 ]["sha256" ], expected_hash )
854- self .assertEqual (manifest ["inputs" ][0 ]["size_bytes" ], len ( content . encode ()) )
855+ self .assertEqual (manifest ["inputs" ][0 ]["size_bytes" ], expected_size )
855856 manifest_text = _json .dumps (manifest , ensure_ascii = False )
856857 self .assertNotIn (str (root ), manifest_text )
857858 self .assertNotIn ("absolute_path" , manifest ["inputs" ][0 ])
You can’t perform that action at this time.
0 commit comments