<commit_before>from nose.plugins.skip import SkipTest
import os
from osutils import Chdir
import sys
import unittest

from raco.language.grappalang import GrappaAlgebra

from generate_test_relations import generate_default, need_generate
from platform_tests import DatalogPlatformTest
from testquery import checkquery, checkstore, GrappalangRunner

sys.path.append('./examples')
from emitcode import emitCode


class DatalogGrappaTest(unittest.TestCase, DatalogPlatformTest):
    def check(self, query, name):
        emitCode(query, 'grappa_%s' % name, GrappaAlgebra, dir='c_test_environment')
        # TODO actually be able to check the query
        raise SkipTest(query)
        with Chdir("c_test_environment") as d:
            checkquery(name, GrappalangRunner())

    def check_file(self, query, name):
        # TODO implement this function
        raise SkipTest(query)<commit_msg>grappa: emit files in the c_test_environment directory<commit_after>from nose.plugins.skip import SkipTest
import os
from osutils import Chdir
import sys
import unittest

from raco.language.grappalang import GrappaAlgebra

from generate_test_relations import generate_default, need_generate
from platform_tests import DatalogPlatformTest
from testquery import checkquery, checkstore, GrappalangRunner

sys.path.append('./examples')
from emitcode import emitCode


class DatalogGrappaTest(unittest.TestCase, DatalogPlatformTest):
    def check(self, query, name):
        with Chdir("c_test_environment") as d:
            emitCode(query, 'grappa_%s' % name, GrappaAlgebra)
            # TODO actually be able to check the query
            raise SkipTest(query)
            checkquery(name, GrappalangRunner())

    def check_file(self, query, name):
        # TODO implement this function
        raise SkipTest(query)
{'fraction_non_alphanumeric': 0.06570955273329653, 'fraction_numerical': 0.0, 'mean_word_length': 4.329411764705882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5435221', 'n_tokens_mistral': 503, 'n_tokens_neox': 499, 'n_words': 156}