Exemplo n.º 1
0
    def given_fake_filesystem(self):
        def these_lines():
            return iter(())

        return build_fake_filesystem(
            ('directory', 'abc/xyz'),
            ('file', same_schema_path, self.given_lines))
Exemplo n.º 2
0
    def given_fake_filesystem(self):
        def these_lines():
            yield ''
            yield 'storage_adapter:     storo_adapto_2'  # #wish1
            yield 'one more line of lookahead'
            raise Exception('no see')

        return build_fake_filesystem(('directory', 'abc/xyz'),
                                     ('file', same_schema_path, these_lines))
Exemplo n.º 3
0
    def given_fake_filesystem(self):
        def these_lines():
            yield '# comment'
            yield ''
            yield 'storage_adapter: xx yy'
            yield 'one more line'
            raise Exception('no see')

        return build_fake_filesystem(('directory', 'abc/xyz'),
                                     ('file', same_schema_path, these_lines))
Exemplo n.º 4
0
    def given_fake_filesystem(self):
        def these_lines():
            yield '# comment'
            yield ''
            yield 'favorite_food: hommous'
            yield 'one more line of lookahead'
            raise Exception('no see')

        return build_fake_filesystem(('directory', 'abc/xyz'),
                                     ('file', same_schema_path, these_lines))
Exemplo n.º 5
0
    def given_fake_filesystem(self):
        def these_lines():
            # yield '' adding 1 or more blank/comments covers a nearby spot
            # yield '#'
            yield 'xx yy zz'
            yield 'one more line of lookahead'
            raise Exception('no see')

        return build_fake_filesystem(('directory', 'abc/xyz'),
                                     ('file', same_schema_path, these_lines))
Exemplo n.º 6
0
    def given_fake_filesystem(self):
        def these_lines():
            yield '# comment'
            yield ''
            yield 'storage_adapter: storo_adapto_1'
            yield ''
            yield '# comment 2'
            yield ''
            yield 'idens_must_start_with_letter: Q'
            yield ''
            yield 'number_of_digits_in_idens: 3'
            yield ''

        return build_fake_filesystem(('directory', 'abc/xyz'),
                                     ('file', same_schema_path, these_lines))
Exemplo n.º 7
0
 def given_fake_filesystem(self):
     lines = iter(('see but ignore\n', ))
     return build_fake_filesystem(('file', 'abc/xyz.xtc', lambda: lines))
Exemplo n.º 8
0
 def given_fake_filesystem(self):
     return build_fake_filesystem(('directory', 'abc/xyz'))
Exemplo n.º 9
0
 def given_fake_filesystem(self):
     return build_fake_filesystem(('file', 'abc/xyz'))
Exemplo n.º 10
0
 def given_fake_filesystem(self):
     return build_fake_filesystem()  # the only one bwe
Exemplo n.º 11
0
 def build_recfile_scanner(self):
     fs = build_fake_filesystem(('file', same_path, self.given_lines))
     fake_file = fs.open_file_for_reading(fs.first_path)
     from kiss_rdb.storage_adapters_.rec import ErsatzScanner
     return ErsatzScanner(fake_file)