FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pytype/pytype/pytype_source_utils_test.py at main · wayhowang/pytype · GitHub
wayhowang
/
pytype
Public
forked from
google/pytype
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pytype
/
pytype
/
pytype_source_utils_test.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (25 loc) · 1.01 KB
Breadcrumbs
pytype
/
pytype
/
pytype_source_utils_test.py
Copy path
File metadata and controls
36 lines (25 loc) · 1.01 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
29
30
31
32
33
34
35
36
"""Tests for pytype_source_utils.py."""
import
os
from
pytype
.
platform_utils
import
path_utils
from
pytype
import
pytype_source_utils
import
unittest
class
PytypeSourceUtilsTest
(
unittest
.
TestCase
):
"""Test pytype source utilities."""
def
setUp
(
self
):
super
().
setUp
()
self
.
root
=
path_utils
.
dirname
(
__file__
)
def
test_pytype_source_dir
(
self
):
self
.
assertEqual
(
self
.
root
,
pytype_source_utils
.
pytype_source_dir
())
def
test_get_full_path
(
self
):
self
.
assertEqual
(
path_utils
.
join
(
self
.
root
,
f"foo
{
os
.
path
.
sep
}
bar"
),
pytype_source_utils
.
get_full_path
(
f"foo
{
os
.
path
.
sep
}
bar"
))
self
.
assertEqual
(
f"
{
os
.
path
.
sep
}
foo
{
os
.
path
.
sep
}
bar"
,
pytype_source_utils
.
get_full_path
(
f"
{
os
.
path
.
sep
}
foo
{
os
.
path
.
sep
}
bar"
))
def
test_list_pytype_files
(
self
):
l
=
list
(
pytype_source_utils
.
list_pytype_files
(
f"stubs
{
os
.
path
.
sep
}
stdlib"
))
self
.
assertIn
(
"_ctypes.pytd"
,
l
)
self
.
assertIn
(
f"collections
{
os
.
path
.
sep
}
__init__.pytd"
,
l
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Back
|
FazBrowse Home
|
New Git URL