Commit be3230a
authored
Fix type checking in Sprite.texture setter (#1409)
* Replace double texture type check with single __debug__ short circuiting check
* Raise TypeError instead of ValueError on wrong type
* Add a test for raising a TypeError when something other than a texture is passed to the setter1 parent 35e9b0a commit be3230a
2 files changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
909 | 908 | | |
910 | 909 | | |
911 | 910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| |||
0 commit comments