# HG changeset patch
# User Paul Ganssle <paul@ganssle.io>
# Date 1525824719 14400
#      Tue May 08 20:11:59 2018 -0400
# Node ID e79352db8d742c5bcab5ea5ed487cb18d48e04f2
# Parent  76669c9ff323b78a266c9f64711315130af0ad8a
Revert "Change weakref test mechanism"

This reverts commit 75ae19924e340414834e4020655ecc242933423e.

diff --git a/dateutil/test/test_tz.py b/dateutil/test/test_tz.py
--- a/dateutil/test/test_tz.py
+++ b/dateutil/test/test_tz.py
@@ -15,7 +15,6 @@
 import base64
 import copy
 import gc
-import weakref
 
 from functools import partial
 
@@ -733,18 +732,18 @@
 
         assert tz1 is tz2
 
-
-@pytest.mark.smoke
-@pytest.mark.tzoffset
-def test_tzoffset_weakref():
-    UTC1 = tz.tzoffset('UTC', 0)
-    UTC_ref = weakref.ref(tz.tzoffset('UTC', 0))
-    UTC1 is UTC_ref()
-    del UTC1
-    gc.collect()
-
-    assert UTC_ref() is None
-    assert UTC_ref() is not tz.tzoffset('UTC', 0)
+    def testTzOffsetWeakRef(self):
+        UTC1 = tz.tzoffset('UTC', 0)
+        UTC2 = tz.tzoffset('UTC', 0)
+        assert id(UTC1) == id(UTC2)
+
+        weak_ref_id = id(UTC1)
+        del UTC1
+        del UTC2
+        gc.collect()
+
+        UTC3 = tz.tzoffset('UTC', 0)
+        assert not weak_ref_id == id(UTC3)
 
 
 @pytest.mark.tzoffset
@@ -1066,20 +1065,20 @@
 
 
 @pytest.mark.xfail(IS_WIN, reason="Windows does not use system zoneinfo")
-@pytest.mark.smoke
 @pytest.mark.gettz
 def test_gettz_weakref():
     tz.gettz.cache_clear()
     NYC1 = tz.gettz('America/New_York')
-    NYC_ref = weakref.ref(tz.gettz('America/New_York'))
-
-    assert NYC1 is NYC_ref()
-
+    NYC2 = tz.gettz('America/New_York')
+    assert id(NYC1) == id(NYC2)
+
+    weak_ref_id = id(NYC1)
     del NYC1
+    del NYC2
     gc.collect()
 
-    assert NYC_ref() is None
-    assert tz.gettz('America/New_York') is not NYC_ref()
+    NYC3 = tz.gettz('America/New_York')
+    assert not weak_ref_id == id(NYC3)
 
 
 class ZoneInfoGettzTest(GettzTest, WarningTestMixin):
@@ -1409,19 +1408,18 @@
         # Ensure that these still are all the same zone
         assert tz1 == tz2 == tz3
 
-
-@pytest.mark.smoke
-@pytest.mark.tzstr
-def test_tzstr_weakref():
-    tz_t1 = tz.tzstr('EST5EDT')
-    tz_t2_ref = weakref.ref(tz.tzstr('EST5EDT'))
-    assert tz_t1 is tz_t2_ref()
-
-    del tz_t1
-    gc.collect()
-
-    assert tz_t2_ref() is None
-    assert tz.tzstr('EST5EDT') is not tz_t2_ref()
+    def testTzOffsetWeakRef(self):
+        tz_t1 = tz.tzstr('EST5EDT')
+        tz_t2 = tz.tzstr('EST5EDT')
+        assert id(tz_t1) == id(tz_t2)
+
+        weak_ref_id = id(tz_t1)
+        del tz_t1
+        del tz_t2
+        gc.collect()
+
+        tz_t3 = tz.tzstr('EST5EDT')
+        assert not weak_ref_id == id(tz_t3)
 
 
 @pytest.mark.tzstr