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
837c7dc1
Commit
837c7dc1
authored
Dec 25, 2018
by
Serhiy Storchaka
Committed by
GitHub
Dec 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-35578: Add an example file for testing Argument Clinic converters. (GH-11306)
parent
95327bc8
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1324 additions
and
1 deletion
+1324
-1
Lib/test/clinic.test
Lib/test/clinic.test
+1307
-0
Lib/test/test_clinic.py
Lib/test/test_clinic.py
+17
-1
No files found.
Lib/test/clinic.test
0 → 100644
View file @
837c7dc1
This diff is collapsed.
Click to expand it.
Lib/test/test_clinic.py
View file @
837c7dc1
...
...
@@ -44,7 +44,6 @@ class FakeConvertersDict:
def
get
(
self
,
name
,
default
):
return
self
.
used_converters
.
setdefault
(
name
,
FakeConverterFactory
(
name
))
clinic
.
Clinic
.
presets_text
=
''
c
=
clinic
.
Clinic
(
language
=
'C'
,
filename
=
"file"
)
class
FakeClinic
:
...
...
@@ -798,5 +797,22 @@ Not at column 0!
self
.
assertEqual
(
stdout
.
getvalue
(),
'Error in file "clown.txt" on line 69:
\
n
The igloos are melting!
\
n
'
)
class
ClinicExternalTest
(
TestCase
):
maxDiff
=
None
def
test_external
(
self
):
source
=
support
.
findfile
(
'clinic.test'
)
with
open
(
source
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
original
=
f
.
read
()
with
support
.
temp_dir
()
as
testdir
:
testfile
=
os
.
path
.
join
(
testdir
,
'clinic.test.c'
)
with
open
(
testfile
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
write
(
original
)
clinic
.
parse_file
(
testfile
,
force
=
True
)
with
open
(
testfile
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
result
=
f
.
read
()
self
.
assertEqual
(
result
,
original
)
if
__name__
==
"__main__"
:
unittest
.
main
()
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