FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pyt/tests/reaching_definitions_test.py at 8githubScanRefactor · python-security/pyt · GitHub
python-security
pyt
Repository navigation
Code
Issues
26
(26)
Pull requests
2
(2)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
pyt
/
tests
/
reaching_definitions_test.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (23 loc) · 1.27 KB
Breadcrumbs
pyt
/
tests
/
reaching_definitions_test.py
Copy path
File metadata and controls
30 lines (23 loc) · 1.27 KB
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
from
.
analysis_base_test_case
import
AnalysisBaseTestCase
from
pyt
.
reaching_definitions
import
ReachingDefinitionsAnalysis
class
ReachingDefinitionsTest
(
AnalysisBaseTestCase
):
def
test_linear_program
(
self
):
lattice
=
self
.
run_analysis
(
'example/example_inputs/linear.py'
,
ReachingDefinitionsAnalysis
)
self
.
assertInCfg
([(
1
,
1
),
(
1
,
2
), (
2
,
2
),
(
1
,
3
), (
2
,
3
),
(
1
,
4
), (
2
,
4
)],
lattice
)
def
test_example
(
self
):
lattice
=
self
.
run_analysis
(
'example/example_inputs/example.py'
,
ReachingDefinitionsAnalysis
)
self
.
assertInCfg
([(
1
,
1
),
(
2
,
2
),
*
self
.
constraints
([
2
,
4
,
6
,
9
,
10
],
3
),
*
self
.
constraints
([
2
,
4
,
6
,
9
,
10
],
4
),
*
self
.
constraints
([
2
,
4
,
6
,
9
,
10
],
5
),
*
self
.
constraints
([
4
,
6
,
10
],
6
),
*
self
.
constraints
([
2
,
4
,
6
,
7
,
9
],
7
),
*
self
.
constraints
([
2
,
4
,
6
,
7
,
9
],
8
),
*
self
.
constraints
([
4
,
7
,
9
],
9
),
*
self
.
constraints
([
2
,
4
,
6
,
9
,
10
],
10
),
*
self
.
constraints
([
2
,
4
,
6
,
9
,
10
],
11
),
*
self
.
constraints
([
2
,
4
,
6
,
9
,
10
],
12
)],
lattice
)
Back
|
FazBrowse Home
|
New Git URL