mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Python: Copy Python extractor to codeql repo
This commit is contained in:
22
python/extractor/tests/test_omit_syntax_error.py
Normal file
22
python/extractor/tests/test_omit_syntax_error.py
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
import shutil
|
||||
import unittest
|
||||
|
||||
import semmle.populator
|
||||
from tests import test_utils
|
||||
|
||||
class OmitSyntaxErrorTest(test_utils.ExtractorTest):
|
||||
|
||||
def __init__(self, name):
|
||||
super(OmitSyntaxErrorTest, self).__init__(name)
|
||||
self.module_path = os.path.abspath(os.path.join(self.here, "syntax-error"))
|
||||
|
||||
def test_omit(self):
|
||||
self.run_extractor("--omit-syntax-error", "error")
|
||||
self.check_only_traps_exists_and_clear()
|
||||
|
||||
def test_dont_omit(self):
|
||||
self.run_extractor("error")
|
||||
self.check_only_traps_exists_and_clear("error", "error")
|
||||
Reference in New Issue
Block a user