MCPcopy Index your code
hub / github.com/numpy/numpy / test_constant_fixed_width

Method test_constant_fixed_width

numpy/lib/tests/test__iotools.py:61–73  ·  view source on GitHub ↗

Test LineSplitter w/ fixed-width fields

(self)

Source from the content-addressed store, hash-verified

59 assert_equal(test, ['1', '2', '3', '4', '', '5'])
60
61 def test_constant_fixed_width(self):
62 "Test LineSplitter w/ fixed-width fields"
63 strg = " 1 2 3 4 5 # test"
64 test = LineSplitter(3)(strg)
65 assert_equal(test, ['1', '2', '3', '4', '', '5', ''])
66 #
67 strg = " 1 3 4 5 6# test"
68 test = LineSplitter(20)(strg)
69 assert_equal(test, ['1 3 4 5 6'])
70 #
71 strg = " 1 3 4 5 6# test"
72 test = LineSplitter(30)(strg)
73 assert_equal(test, ['1 3 4 5 6'])
74
75 def test_variable_fixed_width(self):
76 strg = " 1 3 4 5 6# test"

Callers

nothing calls this directly

Calls 2

LineSplitterClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected