Example #1
0
 def __init__(self, fd, delim=",", quote="\"", output_dicts=False,
              trim=True):
     self.source = repeated.lines(fd)
     self.delim = delim
     self.quote = quote
     self.output_dicts = output_dicts
     self.trim = trim
Example #2
0
 def fixture_len(self):
     with open(testlib.get_fixture_path(self.fixture_name), "r") as fd:
         return counted.count(repeated.lines(fd))
Example #3
0
 def fixture_len(self):
     with open(testlib.get_fixture_path(self.fixture_name), "r") as fd:
         return counted.count(repeated.lines(fd))
Example #4
0
File: io.py Project: Onager/dotty
 def __call__(self, path):
     fd = open(path, "r")
     # We don't close fd here, because repeated.lines is lazy and will read
     # on demand. The descriptor will be closed in the repeated value's
     # destructor.
     return repeated.lines(fd)
Example #5
0
 def __call__(self, path):
     fd = open(path, "r")
     # We don't close fd here, because repeated.lines is lazy and will read
     # on demand. The descriptor will be closed in the repeated value's
     # destructor.
     return repeated.lines(fd)