mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Python: Copy Python extractor to codeql repo
This commit is contained in:
21
python/extractor/tests/test_single.py
Normal file
21
python/extractor/tests/test_single.py
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
import shutil
|
||||
import unittest
|
||||
|
||||
import semmle.populator
|
||||
from tests import test_utils
|
||||
|
||||
class SingleThreadedTest(test_utils.ExtractorTest):
|
||||
|
||||
def __init__(self, name):
|
||||
super(SingleThreadedTest, self).__init__(name)
|
||||
|
||||
def test_simple(self):
|
||||
self.run_extractor("-z1", "package.sub.a")
|
||||
self.check_only_traps_exists_and_clear("a", "package/", "sub/")
|
||||
|
||||
def test_simple_exclude(self):
|
||||
self.run_extractor("-z1", "-y", "package.sub", "mod1", "package.x", "package.sub.a")
|
||||
self.check_only_traps_exists_and_clear("mod1", "package/", "x")
|
||||
Reference in New Issue
Block a user