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
20d92baf
Commit
20d92baf
authored
May 16, 2015
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 24208: Fix tests -- don't create a tempdir in __init__.
parent
01fd6875
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
Lib/test/test_inspect.py
Lib/test/test_inspect.py
+3
-5
No files found.
Lib/test/test_inspect.py
View file @
20d92baf
...
...
@@ -288,9 +288,7 @@ class GetSourceBase(unittest.TestCase):
# Subclasses must override.
fodderModule
=
None
def
__init__
(
self
,
*
args
,
**
kwargs
):
unittest
.
TestCase
.
__init__
(
self
,
*
args
,
**
kwargs
)
def
setUp
(
self
):
with
open
(
inspect
.
getsourcefile
(
self
.
fodderModule
))
as
fp
:
self
.
source
=
fp
.
read
()
...
...
@@ -571,7 +569,7 @@ class TestBuggyCases(GetSourceBase):
self
.
assertSourceEqual
(
mod2
.
ClassWithMethod
.
method
,
118
,
119
)
class
TestNoEOL
(
GetSourceBase
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
setUp
(
self
):
self
.
tempdir
=
TESTFN
+
'_dir'
os
.
mkdir
(
self
.
tempdir
)
with
open
(
os
.
path
.
join
(
self
.
tempdir
,
...
...
@@ -580,7 +578,7 @@ class TestNoEOL(GetSourceBase):
with
DirsOnSysPath
(
self
.
tempdir
):
import
inspect_fodder3
as
mod3
self
.
fodderModule
=
mod3
GetSourceBase
.
__init__
(
self
,
*
args
,
**
kwargs
)
super
().
setUp
(
)
def
tearDown
(
self
):
shutil
.
rmtree
(
self
.
tempdir
)
...
...
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