Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
e1602d9b
Commit
e1602d9b
authored
Apr 12, 2021
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always run garbage collection explicitly in PyPy for the GC-related NumPy tests.
parent
5704109b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
tests/memoryview/numpy_memoryview.pyx
tests/memoryview/numpy_memoryview.pyx
+6
-4
No files found.
tests/memoryview/numpy_memoryview.pyx
View file @
e1602d9b
...
...
@@ -17,6 +17,10 @@ include "../buffers/mockbuffers.pxi"
ctypedef
np
.
int32_t
dtype_t
IS_PYPY
=
hasattr
(
sys
,
'pypy_version_info'
)
NUMPY_VERSION
=
tuple
(
int
(
v
)
for
v
in
np
.
__version__
.
split
(
'.'
)[:
2
])
print
(
NUMPY_VERSION
)
def
get_array
():
# We need to type our array to get a __pyx_get_buffer() that typechecks
# for np.ndarray and calls __getbuffer__ in numpy.pxd
...
...
@@ -39,15 +43,13 @@ def testcase(f):
return
f
def
testcase_numpy_1_5
(
f
):
major
,
minor
,
*
rest
=
np
.
__version__
.
split
(
'.'
)
if
(
int
(
major
),
int
(
minor
))
>=
(
1
,
5
):
if
NUMPY_VERSION
>=
(
1
,
5
)
or
IS_PYPY
:
__test__
[
f
.
__name__
]
=
f
.
__doc__
return
f
def
gc_collect_if_required
():
major
,
minor
,
*
rest
=
np
.
__version__
.
split
(
'.'
)
if
(
int
(
major
),
int
(
minor
))
>=
(
1
,
14
):
if
NUMPY_VERSION
>=
(
1
,
14
)
or
IS_PYPY
:
import
gc
gc
.
collect
()
...
...
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