Opened 5 months ago

Closed 5 months ago

#30597 closed defect (fixed)

bandwidth_file test_version_position fails on python 3

Reported by: teor Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords: ci, travis
Cc: teor Actual Points:
Parent ID: #28170 Points:
Reviewer: Sponsor:

Description

  descriptor.bandwidth_file...                         failed (0.02s)
test_content_example                                   0 ms  [SUCCESS]
test_format_v1_0                                       3 ms  [SUCCESS]
test_format_v1_2                                       3 ms  [SUCCESS]
test_from_str                                          0 ms  [SUCCESS]
test_header_alternate_div                              2 ms  [SUCCESS]
test_header_for_v1                                     0 ms  [SUCCESS]
test_invalid_timestamp                                 1 ms  [SUCCESS]
test_minimal_bandwidth_file                            0 ms  [SUCCESS]
test_new_header_attribute                              0 ms  [SUCCESS]
test_version_position                                        [FAILURE]
======================================================================
FAIL: test_version_position
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/teor2345/stem/test/unit/descriptor/bandwidth_file.py", line 215, in test_version_position
    self.assertEqual(RIGHT_VERSION_POSITION, content)
AssertionError: '1410723598\nversion=1.1.0\nfile_created=2019-01-14T05:35:06\n=====' != b'1410723598\nversion=1.1.0\nfile_created=2019-01-14T05:35:06\n====='
----------------------------------------------------------------------
Ran 10 tests in 0.014s
FAILED (failures=1)

https://travis-ci.org/teor2345/stem/jobs/536613177#L1463

Looks like bytes/string confusion to me.

This error happens on python 3.6 and 3.7, and pypy 3.5.
The python 3.8 builds fail before this test.

Child Tickets

Change History (1)

comment:1 Changed 5 months ago by atagar

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.