FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
coveragepy/tests/test_setup.py at main · coveragepy/coveragepy · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
coveragepy
/
coveragepy
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
523
Star
3.4k
Code
Issues
261
Pull requests
45
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
coveragepy
/
tests
/
test_setup.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
60 lines (46 loc) · 1.99 KB
Breadcrumbs
coveragepy
/
tests
/
test_setup.py
Copy path
File metadata and controls
60 lines (46 loc) · 1.99 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/coveragepy/coveragepy/blob/main/NOTICE.txt
"""Tests of miscellaneous stuff."""
from
__future__
import
annotations
import
sys
from
typing
import
cast
import
pytest
import
coverage
from
coverage
import
env
from
tests
.
coveragetest
import
CoverageTest
class
SetupPyTest
(
CoverageTest
):
"""Tests of setup.py"""
run_in_temp_dir
=
False
def
setUp
(
self
)
->
None
:
super
().
setUp
()
# Force the most restrictive interpretation.
self
.
set_environ
(
"LC_ALL"
,
"C"
)
def
test_metadata
(
self
)
->
None
:
status
,
output
=
self
.
run_command_status
(
"python setup.py --description --version --url --author"
,
)
assert
status
==
0
out
=
output
.
splitlines
()
assert
"measurement"
in
out
[
0
]
assert
coverage
.
__version__
==
out
[
1
]
assert
"github.com/coveragepy/coveragepy"
in
out
[
2
]
assert
"Ned Batchelder"
in
out
[
3
]
@
pytest
.
mark
.
skipif
(
env
.
PYVERSION
[
3
:
5
]
==
(
"alpha"
,
0
),
reason
=
"don't expect classifiers until labelled builds"
,
)
def
test_more_metadata
(
self
)
->
None
:
# Let's be sure we pick up our own setup.py
# CoverageTest restores the original sys.path for us.
sys
.
path
.
insert
(
0
,
""
)
from
setup
import
setup_args
classifiers
=
cast
(
list
[
str
],
setup_args
[
"classifiers"
])
assert
len
(
classifiers
)
>
7
assert
classifiers
[
0
].
startswith
(
"Development Status ::"
)
assert
"Programming Language :: Python :: %d"
%
sys
.
version_info
[:
1
]
in
classifiers
assert
"Programming Language :: Python :: %d.%d"
%
sys
.
version_info
[:
2
]
in
classifiers
assert
setup_args
[
"license_files"
]
==
[
"LICENSE.txt"
,
"NOTICE.txt"
]
long_description
=
cast
(
str
,
setup_args
[
"long_description"
]).
splitlines
()
assert
len
(
long_description
)
>
7
assert
long_description
[
0
].
strip
()
!=
""
assert
long_description
[
-
1
].
strip
()
!=
""
Back
|
FazBrowse Home
|
New Git URL