Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f7165452
Commit
f7165452
authored
Feb 25, 2012
by
Éric Araujo
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 3.2
parents
c071a613
e7295a76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
Lib/test/test_tools.py
Lib/test/test_tools.py
+39
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_tools.py
0 → 100644
View file @
f7165452
"""Tests for scripts in the Tools directory.
This file contains regression tests for some of the scripts found in the
Tools directory of a Python checkout or tarball, such as reindent.py.
"""
import
os
import
unittest
import
sysconfig
from
test
import
support
from
test.script_helper
import
assert_python_ok
if
not
sysconfig
.
is_python_build
():
# XXX some installers do contain the tools, should we detect that
# and run the tests in that case too?
raise
unittest
.
SkipTest
(
'test irrelevant for an installed Python'
)
srcdir
=
sysconfig
.
get_config_var
(
'projectbase'
)
basepath
=
os
.
path
.
join
(
os
.
getcwd
(),
srcdir
,
'Tools'
)
class
ReindentTests
(
unittest
.
TestCase
):
script
=
os
.
path
.
join
(
basepath
,
'scripts'
,
'reindent.py'
)
def
test_noargs
(
self
):
assert_python_ok
(
self
.
script
)
def
test_help
(
self
):
rc
,
out
,
err
=
assert_python_ok
(
self
.
script
,
'-h'
)
self
.
assertEqual
(
out
,
b''
)
self
.
assertGreater
(
err
,
b''
)
def
test_main
():
support
.
run_unittest
(
ReindentTests
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Misc/NEWS
View file @
f7165452
...
...
@@ -498,6 +498,9 @@ Core and Builtins
Library
-------
-
Issue
#
13447
:
Add
a
test
file
to
host
regression
tests
for
bugs
in
the
scripts
found
in
the
Tools
directory
.
-
Issue
#
6884
:
Fix
long
-
standing
bugs
with
MANIFEST
.
in
parsing
in
distutils
on
Windows
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment