MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / make_largefile

Method make_largefile

test/test_browser.py:4465–4471  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4463 self.btest_exit('fetch/test_fetch_response_headers.cpp', cflags=['-sFETCH_DEBUG', '-sFETCH', '-pthread', '-sPROXY_TO_PTHREAD'] + args)
4464
4465 def make_largefile(self):
4466 s = '12345678'
4467 for _ in range(14):
4468 s = s[::-1] + s # length of str will be 2^17=128KB
4469 with open('largefile.txt', 'w', encoding='utf-8') as f:
4470 for _ in range(1024):
4471 f.write(s)
4472
4473 # Test emscripten_fetch() usage to stream a fetch in to memory without storing the full file in memory
4474 # Streaming only works the fetch backend.

Callers 2

Calls 3

rangeFunction · 0.50
openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected