def test_strings_parser(self):
        # Parsing STRINGS content
        files = ['test_utf_16.strings', 'test_utf_8.strings',]
        for i in range(1, 9):
            files.append('bad%d.strings'%i)
        for file_ in files:
            handler = AppleStringsHandler()
            handler.bind_file(os.path.join(os.path.dirname(__file__), file_))
            handler.set_language(self.resource.source_language)
            if file_ in ['test_utf_16.strings', 'test_utf_8.strings']:
                handler.parse_file(is_source=True)
                self.stringset = handler.stringset
                entities = 0
                translations = 0
                for s in self.stringset.strings:
                    entities += 1
                    if s.translation.strip() != '':
                        translations += 1
                self.assertEqual(entities, 4)
                self.assertEqual(translations, 4)
            else:
                self.assertRaises(StringsParseError, handler.parse_file, is_source=True)
Avro schema.
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/resources/tests/lib/strings/__init__.py/TestAppleStrings.test_strings_parser--crossover with--dataset/ETHPy150Open mtth/hdfs/hdfs/ext/avro/__init__.py/AvroWriter.schema