Exemple #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))
Exemple #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))
Exemple #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))
Exemple #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))
Exemple #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))
Exemple #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))
Exemple #7
0
 def given_fake_filesystem(self):
     lines = iter(('see but ignore\n', ))
     return build_fake_filesystem(('file', 'abc/xyz.xtc', lambda: lines))
Exemple #8
0
 def given_fake_filesystem(self):
     return build_fake_filesystem(('directory', 'abc/xyz'))
Exemple #9
0
 def given_fake_filesystem(self):
     return build_fake_filesystem(('file', 'abc/xyz'))
Exemple #10
0
 def given_fake_filesystem(self):
     return build_fake_filesystem()  # the only one bwe
Exemple #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)