Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5918 closed defect (fixed)

test_launch_tor_options fails in test.integ.process

Reported by: gsathya Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords:
Cc: gsathya Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

======================================================================
                          test.integ.process                          
======================================================================

test_launch_tor_options                                      [FAILURE]
test_launch_tor_with_timeout                                 [SUCCESS]

======================================================================
FAIL: test_launch_tor_options
----------------------------------------------------------------------
Traceback:
  File "/Users/sathya/Documents/stem/test/integ/process.py", line 46, in test_launch_tor_options
    self.assertEquals("version=%s\nOK" % runner.get_tor_version(), str(version_response))
AssertionError: 'version=0.2.3.11-alpha-dev\nOK' != 'version=0.2.3.11-alpha-dev\nOK'

setting a pdb.set_trace() above line #46,

> /Users/sathya/Documents/stem/test/integ/process.py(46)test_launch_tor_options()
-> self.assertEquals("version=%s\nOK" % runner.get_tor_version(), str(version_response))
(Pdb) p str(version_response)
'version=0.2.3.11-alpha-dev (git-ef0bc7f8f26a917c)\nOK'
(Pdb) p "version=%s\nOK" % runner.get_tor_version()
'version=0.2.3.11-alpha-dev\nOK'

Looks like the git commit hash is messing up the assertion. But I wonder why the git commit hash didn't show up in the AssertionError.

Child Tickets

Change History (3)

comment:1 Changed 5 years ago by atagar

Oops. Yup, clear mistake in that test.

But I wonder why the git commit hash didn't show up in the AssertionError.

Agreed, that is really weird. :/

comment:2 follow-up: Changed 5 years ago by atagar

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, thanks for the catch!
https://gitweb.torproject.org/stem.git/commitdiff/aed91aa634b9f960e87296b9e631a2c6aa05f2c0

If you're able to figure out why the AssertionError looks wrong then I'm definitely curious. It might indicate a sinister error derived from the ControlLine (a string subclass that's used to make the version_response contents). Hope there's another more reasonable explanation...

comment:3 in reply to: ↑ 2 Changed 5 years ago by gsathya

Replying to atagar:

Fixed, thanks for the catch!
https://gitweb.torproject.org/stem.git/commitdiff/aed91aa634b9f960e87296b9e631a2c6aa05f2c0

No problem. Tested. It's fixed.

If you're able to figure out why the AssertionError looks wrong then I'm definitely curious. It might indicate a sinister error derived from the ControlLine (a string subclass that's used to make the version_response contents). Hope there's another more reasonable explanation...

I'm pretty clueless. neena ran into this bug a while ago, I wonder what he did.

Note: See TracTickets for help on using tickets.