Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
865898f5
Commit
865898f5
authored
May 09, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove a bunch of changes we made to cpython's testsuite
parent
dacfd456
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
44 deletions
+12
-44
from_cpython/Lib/test/test_abc.py
from_cpython/Lib/test/test_abc.py
+1
-2
from_cpython/Lib/test/test_array.py
from_cpython/Lib/test/test_array.py
+0
-2
from_cpython/Lib/test/test_complex.py
from_cpython/Lib/test/test_complex.py
+1
-4
from_cpython/Lib/test/test_file2k.py
from_cpython/Lib/test/test_file2k.py
+0
-2
from_cpython/Lib/test/test_fileio.py
from_cpython/Lib/test/test_fileio.py
+0
-2
from_cpython/Lib/test/test_mmap.py
from_cpython/Lib/test/test_mmap.py
+4
-16
from_cpython/Lib/test/test_set.py
from_cpython/Lib/test/test_set.py
+2
-6
from_cpython/Lib/test/test_signal.py
from_cpython/Lib/test/test_signal.py
+4
-6
src/runtime/capi.cpp
src/runtime/capi.cpp
+0
-4
No files found.
from_cpython/Lib/test/test_abc.py
View file @
865898f5
...
...
@@ -223,8 +223,7 @@ class TestABC(unittest.TestCase):
C
().
f
()
del
C
test_support
.
gc_collect
()
# Pyston change: disable it for now.
# self.assertEqual(r(), None)
self
.
assertEqual
(
r
(),
None
)
def
test_main
():
test_support
.
run_unittest
(
TestABC
)
...
...
from_cpython/Lib/test/test_array.py
View file @
865898f5
...
...
@@ -765,8 +765,6 @@ class BaseTest(unittest.TestCase):
b
=
buffer
(
a
)
self
.
assertEqual
(
b
[
0
],
a
.
tostring
()[
0
])
# Pyston change: disable this test because of our GC
@
unittest
.
skip
(
"Pyston"
in
sys
.
version
)
def
test_weakref
(
self
):
s
=
array
.
array
(
self
.
typecode
,
self
.
example
)
p
=
proxy
(
s
)
...
...
from_cpython/Lib/test/test_complex.py
View file @
865898f5
...
...
@@ -433,15 +433,12 @@ class ComplexTest(unittest.TestCase):
test_values
=
(
1
,
123.0
,
10
-
19j
,
xcomplex
(
1
+
2j
),
xcomplex
(
1
+
87j
),
xcomplex
(
10
+
90j
))
# Pyston change: if rhs is a subclass of lhs, then should try
# reverse the order. Pyston don't support it yet. Need to improve
# binop handing.
for
op
in
infix_binops
:
for
x
in
xcomplex_values
:
for
y
in
test_values
:
a
=
'x %s y'
%
op
b
=
'y %s x'
%
op
#
self.assertTrue(type(eval(a)) is type(eval(b)) is xcomplex)
self
.
assertTrue
(
type
(
eval
(
a
))
is
type
(
eval
(
b
))
is
xcomplex
)
def
test_hash
(
self
):
for
x
in
xrange
(
-
30
,
30
):
...
...
from_cpython/Lib/test/test_file2k.py
View file @
865898f5
...
...
@@ -29,8 +29,6 @@ class AutoFileTests(unittest.TestCase):
self
.
f
.
close
()
os
.
remove
(
TESTFN
)
# Pyston change: disabled
@
unittest
.
skip
(
"this depends on refcounting"
)
def
testWeakRefs
(
self
):
# verify weak references
p
=
proxy
(
self
.
f
)
...
...
from_cpython/Lib/test/test_fileio.py
View file @
865898f5
...
...
@@ -28,8 +28,6 @@ class AutoFileTests(unittest.TestCase):
self
.
f
.
close
()
os
.
remove
(
TESTFN
)
# Pyston change: disable this test becasue of GC
@
unittest
.
skip
(
"only works with refcounting"
)
def
testWeakRefs
(
self
):
# verify weak references
p
=
proxy
(
self
.
f
)
...
...
from_cpython/Lib/test/test_mmap.py
View file @
865898f5
...
...
@@ -119,10 +119,7 @@ class MmapTests(unittest.TestCase):
def
test_access_parameter
(
self
):
# Test for "access" keyword parameter
mapsize
=
10
# Pyston change: use a with statement to not rely on the destructor being called:
# open(TESTFN, "wb").write("a"*mapsize)
with
open
(
TESTFN
,
"wb"
)
as
f
:
f
.
write
(
"a"
*
mapsize
)
open
(
TESTFN
,
"wb"
).
write
(
"a"
*
mapsize
)
f
=
open
(
TESTFN
,
"rb"
)
m
=
mmap
.
mmap
(
f
.
fileno
(),
mapsize
,
access
=
mmap
.
ACCESS_READ
)
self
.
assertEqual
(
m
[:],
'a'
*
mapsize
,
"Readonly memory map data incorrect."
)
...
...
@@ -541,10 +538,7 @@ class MmapTests(unittest.TestCase):
@
unittest
.
skipUnless
(
hasattr
(
mmap
,
'PROT_READ'
),
"needs mmap.PROT_READ"
)
def
test_prot_readonly
(
self
):
mapsize
=
10
# Pyston change: use a with statement to not rely on the destructor being called:
# open(TESTFN, "wb").write("a"*mapsize)
with
open
(
TESTFN
,
"wb"
)
as
f
:
f
.
write
(
"a"
*
mapsize
)
open
(
TESTFN
,
"wb"
).
write
(
"a"
*
mapsize
)
f
=
open
(
TESTFN
,
"rb"
)
m
=
mmap
.
mmap
(
f
.
fileno
(),
mapsize
,
prot
=
mmap
.
PROT_READ
)
self
.
assertRaises
(
TypeError
,
m
.
write
,
"foo"
)
...
...
@@ -556,10 +550,7 @@ class MmapTests(unittest.TestCase):
def
test_io_methods
(
self
):
data
=
"0123456789"
# Pyston change: use a with statement to not rely on the destructor being called:
# open(TESTFN, "wb").write("x"*len(data))
with
open
(
TESTFN
,
"wb"
)
as
f
:
f
.
write
(
"x"
*
len
(
data
))
open
(
TESTFN
,
"wb"
).
write
(
"x"
*
len
(
data
))
f
=
open
(
TESTFN
,
"r+b"
)
m
=
mmap
.
mmap
(
f
.
fileno
(),
len
(
data
))
f
.
close
()
...
...
@@ -626,10 +617,7 @@ class MmapTests(unittest.TestCase):
m
.
close
()
# Should not crash (Issue 5385)
# Pyston change: use a with statement to not rely on the destructor being called:
# open(TESTFN, "wb").write("x"*10)
with
open
(
TESTFN
,
"wb"
)
as
f
:
f
.
write
(
"x"
*
10
)
open
(
TESTFN
,
"wb"
).
write
(
"x"
*
10
)
f
=
open
(
TESTFN
,
"r+b"
)
m
=
mmap
.
mmap
(
f
.
fileno
(),
0
)
f
.
close
()
...
...
from_cpython/Lib/test/test_set.py
View file @
865898f5
...
...
@@ -337,9 +337,7 @@ class TestJointOps(unittest.TestCase):
obj
.
x
=
iter
(
container
)
del
obj
,
container
gc
.
collect
()
# Pyston change: because with conservative scanning
# it is hard to guarantee finalizer calls
# self.assertTrue(ref() is None, "Cycle was not collected")
self
.
assertTrue
(
ref
()
is
None
,
"Cycle was not collected"
)
class
TestSet
(
TestJointOps
):
thetype
=
set
...
...
@@ -560,9 +558,7 @@ class TestSet(TestJointOps):
p
=
weakref
.
proxy
(
s
)
self
.
assertEqual
(
str
(
p
),
str
(
s
))
s
=
None
# Pyston change: because with conservative scanning
# it is hard to guarantee finalizer calls
# self.assertRaises(ReferenceError, str, p)
self
.
assertRaises
(
ReferenceError
,
str
,
p
)
@
unittest
.
skipUnless
(
hasattr
(
set
,
"test_c_api"
),
'C API test only available in a debug build'
)
...
...
from_cpython/Lib/test/test_signal.py
View file @
865898f5
...
...
@@ -79,8 +79,7 @@ class InterProcessSignalTests(unittest.TestCase):
# don't worry about re-setting the default handlers.
signal
.
signal
(
signal
.
SIGHUP
,
self
.
handlerA
)
signal
.
signal
(
signal
.
SIGUSR1
,
self
.
handlerB
)
# Pyston change: pyston uses SIGUSR2 internally
# signal.signal(signal.SIGUSR2, signal.SIG_IGN)
signal
.
signal
(
signal
.
SIGUSR2
,
signal
.
SIG_IGN
)
signal
.
signal
(
signal
.
SIGALRM
,
signal
.
default_int_handler
)
# Variables the signals will modify:
...
...
@@ -118,10 +117,9 @@ class InterProcessSignalTests(unittest.TestCase):
print
"HandlerBCalled exception caught"
# Pyston change: pyston uses SIGUSR2 internally
# child = ignoring_eintr(subprocess.Popen, ['kill', '-USR2', str(pid)])
# if child:
# self.wait(child) # Nothing should happen.
child
=
ignoring_eintr
(
subprocess
.
Popen
,
[
'kill'
,
'-USR2'
,
str
(
pid
)])
if
child
:
self
.
wait
(
child
)
# Nothing should happen.
try
:
signal
.
alarm
(
1
)
...
...
src/runtime/capi.cpp
View file @
865898f5
...
...
@@ -1359,10 +1359,6 @@ extern "C" PyOS_sighandler_t PyOS_getsig(int sig) noexcept {
}
extern
"C"
PyOS_sighandler_t
PyOS_setsig
(
int
sig
,
PyOS_sighandler_t
handler
)
noexcept
{
if
(
sig
==
SIGUSR2
)
{
Py_FatalError
(
"SIGUSR2 is reserved for Pyston internal use"
);
}
#ifdef HAVE_SIGACTION
/* Some code in Modules/signalmodule.c depends on sigaction() being
* used here if HAVE_SIGACTION is defined. Fix that if this code
...
...
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