Edouard Choinière
95cafd1a3f
style: Normalise numpy imports with import numpy as np
...
The convention when importing numpy is to use `import numpy as np`
Fixes: unconventional-import-alias (ICN001)
Ruff rule: https://docs.astral.sh/ruff/rules/unconventional-import-alias/
2025-02-08 16:48:57 +00:00
Robin Dunn
efa81882e3
Also allow numpy arrays for sequence conversions to value types
2017-04-17 17:22:50 -07:00
Robin Dunn
52facb4d7f
Add a GetIM() method to Colour, Point, Size, Rect and other ‘value’ types.
...
GetIM() returns a replicant of the original object that is immutable, so it can be used as a dictionary key, or etc., but still gives access to the properties by name, which using the Get() method to get a tuple of the values does not do.
2017-04-14 19:19:26 -07:00
Robin Dunn
5d7b9e6b17
Don’t test with the == operators, that will be changing in a different way in another PR
2017-04-12 16:55:22 -07:00
Robin Dunn
b01729f4ef
Tighten up allowed types in auto sequence conversions
...
Instead of allowing generic sequences to be convertible to wxPoint, wxSize, and others, explicitly allow only tuples and lists. This is needed because these types also have methods that make them look like sequences, which meant that you could pass a wxSize where a wxPoint is expected, and so on.
Even worse is nonsense stuff like:
wx.Point(10,20) == wx.Size(10,20)
evaluating to True.
2017-04-12 13:57:08 -07:00
Metallicow
9568103974
Trim trailing space unittests directory
2016-12-05 16:19:11 -06:00
Robin Dunn
bb01dc0d7f
Use absolute import of wtc in the unittest modules, instead of depending on them being run as __main__ and getting the folder on the sys.path by default.
2016-06-30 16:49:19 -07:00
Robin Dunn
4f38ee259d
Remove imp_unittest
2016-05-07 19:16:28 -07:00
Robin Dunn
2078c55af7
Use a MappedType for wxIntPtr and wxUIntPtr too.
2016-03-09 20:29:12 -08:00
Robin Dunn
5204b0f739
Switch to using wtc.WidgetTestCase so there is a wx.App while this test is run
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-02 05:37:33 +00:00
Robin Dunn
a548f7224d
unittest updates and new test modules
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-15 16:16:21 +00:00
Robin Dunn
5e89a9606d
Change the package name from wxPhoenix to wx
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-03 02:39:18 +00:00
Robin Dunn
96717983ad
A boatload of changes and additions, all my Phoenix work for the past few days. Lots of lower level classes are wrapped, wxApp is working up through OnInit, plus there's a good start on some unit tests.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-27 08:53:17 +00:00