Exemple #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
 def fixture_len(self):
     with open(testlib.get_fixture_path(self.fixture_name), "r") as fd:
         return counted.count(repeated.lines(fd))
Exemple #3
0
 def fixture_len(self):
     with open(testlib.get_fixture_path(self.fixture_name), "r") as fd:
         return counted.count(repeated.lines(fd))
Exemple #4
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)
Exemple #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)