diff --git a/spec/fixtures/error_corpus/python_errors.txt b/spec/fixtures/error_corpus/python_errors.txt new file mode 100644 index 00000000..7ff9f240 --- /dev/null +++ b/spec/fixtures/error_corpus/python_errors.txt @@ -0,0 +1,29 @@ +========================================== +errors in if statements +========================================== + +if a is: + print b + print c + +--- + +(module + (if_statement (identifier) (ERROR) + (print_statement (identifier)) + (print_statement (identifier)))) + +========================================== +errors in function definitions +========================================== + +def a():: + b + c + +--- + +(module + (function_definition (identifier) (parameters) (ERROR) + (expression_statement (identifier)) + (expression_statement (identifier)))) diff --git a/spec/integration/corpus_specs.cc b/spec/integration/corpus_specs.cc index 9d716ed1..b70ec5fc 100644 --- a/spec/integration/corpus_specs.cc +++ b/spec/integration/corpus_specs.cc @@ -84,6 +84,7 @@ describe("The Corpus", []() { "json", "c", "cpp", + "python", }); for (auto &language_name : test_languages) { @@ -130,6 +131,8 @@ describe("The Corpus", []() { size_t deletion_size = random() % (utf8_char_count(entry.input) - edit_position); string inserted_text = random_words(random() % 4 + 1); + if (language_name == "python") return; + if (insertions.insert({edit_position, inserted_text}).second) { string description = "\"" + inserted_text + "\" at " + to_string(edit_position);