Fix #240
This commit is contained in:
parent
ecae8544f4
commit
bd6f923f43
|
@ -272,10 +272,9 @@ def test_tz_class():
|
||||||
assert dt.utcoffset() == pdt.timedelta(hours=1)
|
assert dt.utcoffset() == pdt.timedelta(hours=1)
|
||||||
assert dt.dst() is None
|
assert dt.dst() is None
|
||||||
|
|
||||||
@pytest.mark.skip(reason='to debug with the latest master')
|
|
||||||
def test_tz_class_introspection():
|
def test_tz_class_introspection():
|
||||||
tzi = rdt.TzClass()
|
tzi = rdt.TzClass()
|
||||||
|
|
||||||
assert tzi.__class__ == rdt.TzClass
|
assert tzi.__class__ == rdt.TzClass
|
||||||
assert repr(tzi) == "TzClass()"
|
assert repr(tzi).startswith('<rustapi_module.datetime.TzClass object at')
|
||||||
|
|
||||||
|
|
|
@ -441,11 +441,6 @@ where
|
||||||
|
|
||||||
// set type flags
|
// set type flags
|
||||||
py_class_flags::<T>(type_object);
|
py_class_flags::<T>(type_object);
|
||||||
if type_object.tp_base
|
|
||||||
!= unsafe { &ffi::PyBaseObject_Type as *const ffi::PyTypeObject as *mut ffi::PyTypeObject }
|
|
||||||
{
|
|
||||||
type_object.tp_flags |= ffi::Py_TPFLAGS_HEAPTYPE
|
|
||||||
}
|
|
||||||
|
|
||||||
// register type object
|
// register type object
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in New Issue