Skip to content

Commit 455b035

Browse files
committed
Skip gccolect test for python < 3
Signed-off-by: Krukov Dima <glebov.ru@gmail.com>
1 parent c02a6fa commit 455b035

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

prometheus_client/gc_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import time
88
from collections import defaultdict
99

10+
from .metrics import Histogram
1011
from .metrics_core import HistogramMetricFamily
1112
from .registry import REGISTRY
12-
from .metrics import Histogram
1313
from .utils import INF
1414

1515

tests/test_gc_collector.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from __future__ import unicode_literals
22

33
import gc
4+
import sys
45
import unittest
56

67
from prometheus_client import CollectorRegistry, GCCollector
78

89

10+
@unittest.skipIf(sys.version_info < (3, ), "Test requires Python 3.+")
911
class TestGCCollector(unittest.TestCase):
1012
def setUp(self):
1113
gc.disable()

0 commit comments

Comments
 (0)