Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3334aa9

Browse filesBrowse files
darleybarretoyouknowone
authored andcommitted
Adding several changes to make some tests pass
1 parent 8053d7b commit 3334aa9
Copy full SHA for 3334aa9
Expand file treeCollapse file tree

16 files changed

+139
-98
lines changed

‎Lib/ctypes/__init__.py

Copy file name to clipboardExpand all lines: Lib/ctypes/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,4 +346,4 @@ def WinError(code=None, descr=None):
346346
elif sizeof(kind) == 8: c_uint64 = kind
347347
del(kind)
348348

349-
_reset_cache()
349+
# _reset_cache()
File renamed without changes.
File renamed without changes.

‎Lib/ctypes/tests/test_arrays.py renamed to ‎Lib/ctypes/test/test_arrays.py

Copy file name to clipboardExpand all lines: Lib/ctypes/test/test_arrays.py
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,37 +177,42 @@ def test_bad_subclass(self):
177177
with self.assertRaises(AttributeError):
178178
class T(Array):
179179
pass
180+
T()
180181
with self.assertRaises(AttributeError):
181182
class T(Array):
182183
_type_ = c_int
184+
T()
183185
with self.assertRaises(AttributeError):
184186
class T(Array):
185187
_length_ = 13
186-
188+
T()
187189
def test_bad_length(self):
188190
with self.assertRaises(ValueError):
189191
class T(Array):
190192
_type_ = c_int
191193
_length_ = - sys.maxsize * 2
194+
T()
192195
with self.assertRaises(ValueError):
193196
class T(Array):
194197
_type_ = c_int
195198
_length_ = -1
199+
T()
196200
with self.assertRaises(TypeError):
197201
class T(Array):
198202
_type_ = c_int
199203
_length_ = 1.87
204+
T()
200205
with self.assertRaises(OverflowError):
201206
class T(Array):
202207
_type_ = c_int
203208
_length_ = sys.maxsize * 2
204-
209+
T()
205210
def test_zero_length(self):
206211
# _length_ can be zero.
207212
class T(Array):
208213
_type_ = c_int
209214
_length_ = 0
210-
215+
T()
211216
@unittest.skip("TODO: RUSTPYTHON, implrment Structure")
212217
def test_empty_element_struct(self):
213218
class EmptyStruct(Structure):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.