MCPcopy
hub / github.com/dask/dask / test_complex_delimiter

Function test_complex_delimiter

dask/bag/tests/test_text.py:138–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136
137
138def test_complex_delimiter():
139 longstr = "abc\ndef\n123\n$$$$\ndog\ncat\nfish\n\n\r\n$$$$hello"
140 with filetexts({".test.delim.txt": longstr}):
141 assert read_text(".test.delim.txt", linedelimiter="$$$$").count().compute() == 3
142 assert (
143 read_text(".test.delim.txt", linedelimiter="$$$$", blocksize=2)
144 .count()
145 .compute()
146 == 3
147 )
148 vals = read_text(".test.delim.txt", linedelimiter="$$$$").compute()
149 assert vals[-1] == "hello"
150 assert vals[0].endswith("$$$$")
151 vals = read_text(".test.delim.txt", linedelimiter="$$$$", blocksize=2).compute()
152 assert vals[-1] == "hello"
153 assert vals[0].endswith("$$$$")

Callers

nothing calls this directly

Calls 4

filetextsFunction · 0.90
read_textFunction · 0.90
computeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…