<commit_before># Run with:
# % python generate_javascript_tests.py > ../javascript/generated_tests.js
import inspect
from pottymouth import Node
from tests import basic_tests

class JavaScriptTestGenerator(basic_tests):
    def _helper(self, source, expected):
        # import pdb; pdb.set_trace()
        if isinstance(source, str):
            source = source.decode('utf8')
        print(u"""    equal(p.parse(%s).toString(),\n      %r,\n      '%s');""" % (
            repr(source)[1:], # strip off the u prefix<commit_msg>removing commented out pdb.set_trace()<commit_after># Run with:
# % python generate_javascript_tests.py > ../javascript/generated_tests.js
import inspect
from pottymouth import Node
from tests import basic_tests

class JavaScriptTestGenerator(basic_tests):
    def _helper(self, source, expected):
        if isinstance(source, str):
            source = source.decode('utf8')
        print(u"""    equal(p.parse(%s).toString(),\n      %r,\n      '%s');""" % (
            repr(source)[1:], # strip off the u prefix
{'fraction_non_alphanumeric': 0.1342281879194631, 'fraction_numerical': 0.003835091083413231, 'mean_word_length': 3.3140495867768593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4314579', 'n_tokens_mistral': 305, 'n_tokens_neox': 304, 'n_words': 79}