8000 tests fail for Python 3.4 on Debian 8 · Issue #46 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

tests fail for Python 3.4 on Debian 8 #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
taibhse opened this issue Sep 13, 2015 · 1 comment
Closed

tests fail for Python 3.4 on Debian 8 #46

taibhse opened this issue Sep 13, 2015 · 1 comment

Comments

@taibhse
Copy link
taibhse commented Sep 13, 2015

I forked the repo, have working tests on Python2, but they fail on Python 3.4.

python3 --version: Python 3.4.2
Debian 8 (jessie)

python3 setup.py test 2> out.txt

test_block_decorator (tests.test_client.TestCounter) ... ok
test_function_decorator (tests.test_client.TestCounter) ... ok
test_increment (tests.test_client.TestCounter) ... ok
test_negative_increment_raises (tests.test_client.TestCounter) ... ok
test_block_decorator (tests.test_client.TestGauge) ... ok
test_function_decorator (tests.test_client.TestGauge) ... ok
test_gauge (tests.test_client.TestGauge) ... ok
test_gauge_function (tests.test_client.TestGauge) ... ok
test_counter (tests.test_client.TestGenerateText) ... ok
test_escaping (tests.test_client.TestGenerateText) ... ok
test_gauge (tests.test_client.TestGenerateText) ... ok
test_nonnumber (tests.test_client.TestGenerateText) ... ok
test_summary (tests.test_client.TestGenerateText) ... ok
test_unicode (tests.test_client.TestGenerateText) ... ok
test_block_decorator (tests.test_client.TestHistogram) ... ok
test_function_decorator (tests.test_client.TestHistogram) ... ok
test_histogram (tests.test_client.TestHistogram) ... ok
test_labels (tests.test_client.TestHistogram) ... ok
test_setting_buckets (tests.test_client.TestHistogram) ... ok
test_child (tests.test_client.TestMetricWrapper) ... ok
test_incorrect_label_count_raises (tests.test_client.TestMetricWrapper) ... ok
test_invalid_names_raise (tests.test_client.TestMetricWrapper) ... ok
test_labels_by_dict (tests.test_client.TestMetricWrapper) ... ok
test_labels_coerced_to_string (tests.test_client.TestMetricWrapper) ... ok
test_namespace_subsystem_concatenated (tests.test_client.TestMetricWrapper) ... ok
test_non_string_labels_raises (tests.test_client.TestMetricWrapper) ... ok
test_remove (tests.test_client.TestMetricWrapper) ... ok
test_namespace (tests.test_client.TestProcessCollector) ... ok
test_working (tests.test_client.TestProcessCollector) ... ok
test_working_584 (tests.test_client.TestProcessCollector) ... ok
test_working_fake_pid (tests.test_client.TestProcessCollector) ... ok
test_delete (tests.test_client.TestPushGateway) ... 127.0.0.1 - - [13/Sep/2015 13:18:04] "DELETE /job/my_job HTTP/1.1" 201 -
ERROR
test_instance_ip_grouping_key (tests.test_client.TestPushGateway) ... /root/client_python/tests/test_client.py:479: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketType.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 53921)>
  self.assertTrue('' != instance_ip_grouping_key()['instance'])
ok
test_push (tests.test_client.TestPushGateway) ... 127.0.0.1 - - [13/Sep/2015 13:18:04] "PUT /job/my_job HTTP/1.1" 201 -
ERROR
test_push_with_complex_groupingkey (tests.test_client.TestPushGateway) ... 127.0.0.1 - - [13/Sep/2015 13:18:04] "PUT /job/my_job/a/9/b/a%2F+z HTTP/1.1" 201 -
ERROR
test_push_with_groupingkey (tests.test_client.TestPushGateway) ... 127.0.0.1 - - [13/Sep/2015 13:18:04] "PUT /job/my_job/a/9 HTTP/1.1" 201 -
ERROR
test_pushadd (tests.test_client.TestPushGateway) ... 127.0.0.1 - - [13/Sep/2015 13:18:04] "POST /job/my_job HTTP/1.1" 201 -
ERROR
est_pushadd_with_groupingkey (tests.test_client.TestPushGateway) ... 127.0.0.1 - - [13/Sep/2015 13:18:04] "DELETE /job/my_job/a/9 HTTP/1.1" 201 -
ERROR
test_block_decorator (tests.test_client.TestSummary) ... ok
test_function_decorator (tests.test_client.TestSummary) ... ok
test_summary (tests.test_client.TestSummary) ... ok
test_labels (tests.graphite_bridge.TestGraphiteBridge) ... ok
test_nolabels (tests.graphite_bridge.TestGraphiteBridge) ... ok
test_sanitizing (tests.graphite_bridge.TestGraphiteBridge) ... ok

======================================================================
ERROR: test_delete (tests.test_client.TestPushGateway)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/client_python/tests/test_client.py", line 465, in test_delete
    delete_from_gateway(self.address, "my_job")
  File "/root/client_python/prometheus_client/exposition.py", line 103, in delete_from_gateway
    _use_gateway('DELETE', gateway, job, None, grouping_key, timeout)
  File "/root/client_python/prometheus_client/exposition.py", line 122, in _use_gateway
    resp = build_opener(HTTPHandler).open(request, timeout=timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 455, in open
    response = self._open(req, data)
  File "/usr/lib/python3.4/urllib/request.py", line 473, in _open
    '_open', req)
  File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 1202, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.4/urllib/request.py", line 1177, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.4/http/client.py", line 1172, in getresponse
    response.begin()
  File "/usr/lib/python3.4/http/client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.4/http/client.py", line 321, in _read_status
    raise BadStatusLine(line)
http.client.BadStatusLine: ''

======================================================================
ERROR: test_push (tests.test_client.TestPushGateway)
----------------------------------------------------------------------
[....]
======================================================================
ERROR: test_push_with_complex_groupingkey (tests.test_client.TestPushGateway)
----------------------------------------------------------------------
[....]
======================================================================
ERROR: test_push_with_groupingkey (tests.test_client.TestPushGateway)
----------------------------------------------------------------------
[....]
======================================================================
ERROR: test_pushadd (tests.test_client.TestPushGateway)
----------------------------------------------------------------------
[....]
======================================================================
ERROR: test_pushadd_with_groupingkey (tests.test_client.TestPushGateway)
----------------------------------------------------------------------
[....]
----------------------------------------------------------------------
Ran 44 tests in 0.062s

FAILED (errors=6)
@brian-brazil
Copy link
Contributor

Fixed by #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0