FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/extractor/tests/test_file.py at codeql-cli-2.27.1 · github/codeql · GitHub
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10.1k
Code
Issues
1k
Pull requests
468
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
extractor
/
tests
/
test_file.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (23 loc) · 809 Bytes
Breadcrumbs
codeql
/
python
/
extractor
/
tests
/
test_file.py
Copy path
File metadata and controls
30 lines (23 loc) · 809 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import
sys
import
os
.
path
import
shutil
import
unittest
import
subprocess
import
semmle
.
populator
from
tests
import
test_utils
class
FileOptionTest
(
test_utils
.
ExtractorTest
):
def
__init__
(
self
,
name
):
super
(
FileOptionTest
,
self
).
__init__
(
name
)
def
test_file
(
self
):
self
.
run_extractor
(
"-F"
,
"tests/data/mod1.py"
)
self
.
check_only_traps_exists_and_clear
(
"mod1"
)
def
test_no_file
(
self
):
try
:
self
.
run_extractor
(
"-F"
,
"this-file-does-not-exist.py"
)
except
subprocess
.
CalledProcessError
as
ex
:
self
.
assertEqual
(
ex
.
returncode
,
1
)
def
test_no_module
(
self
):
try
:
self
.
run_extractor
(
"this_module_does_not_exist"
)
except
subprocess
.
CalledProcessError
as
ex
:
self
.
assertEqual
(
ex
.
returncode
,
1
)
Back
|
FazBrowse Home
|
New Git URL