Re: [tor-bugs] #29352 [Core Tor/Stem]: AttributeError when running bandwidth_file.py test

2019-02-07 Thread Tor Bug Tracker & Wiki
#29352: AttributeError when running bandwidth_file.py test
---+
 Reporter:  juga   |  Owner:  atagar
 Type:  defect | Status:  closed
 Priority:  Medium |  Milestone:
Component:  Core Tor/Stem  |Version:
 Severity:  Normal | Resolution:  worksforme
 Keywords: |  Actual Points:
Parent ID: | Points:
 Reviewer: |Sponsor:
---+

Comment (by atagar):

 Hi juga. That's because you attempted to start to write a Stem integ test
 but didn't include it in 'test/settings.cfg'. Simply add a line below its
 'test.integ_tests' field (which determines the order that tests are ran
 in) or remove the test you were working on.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #29352 [Core Tor/Stem]: AttributeError when running bandwidth_file.py test

2019-02-07 Thread Tor Bug Tracker & Wiki
#29352: AttributeError when running bandwidth_file.py test
---+
 Reporter:  juga   |  Owner:  atagar
 Type:  defect | Status:  closed
 Priority:  Medium |  Milestone:
Component:  Core Tor/Stem  |Version:
 Severity:  Normal | Resolution:  worksforme
 Keywords: |  Actual Points:
Parent ID: | Points:
 Reviewer: |Sponsor:
---+

Comment (by juga):

 Replying to [comment:1 atagar]:
 > Hi juga, that's not how you run Stem's tests. Please check...
 >
 > https://stem.torproject.org/faq.html#how-do-i-run-the-tests

 oh, didn't see that, sorry.

 > Use the '--test' argument if you would like to run only a single test.
 >
 > {{{
 > % ./run_tests.py --unit --test descriptor.bandwidth_file
 > [...]
 > TESTING PASSED (0 seconds)
 > }}}

 I'm still doing something wrong, cause i get:
 {{{
 [...]
   checking for unused tests...   failed

 Test modules are missing from our test/settings.cfg:
 test.integ.directory.bandwidth_authority.TestAuthority
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #29352 [Core Tor/Stem]: AttributeError when running bandwidth_file.py test

2019-02-06 Thread Tor Bug Tracker & Wiki
#29352: AttributeError when running bandwidth_file.py test
---+
 Reporter:  juga   |  Owner:  atagar
 Type:  defect | Status:  closed
 Priority:  Medium |  Milestone:
Component:  Core Tor/Stem  |Version:
 Severity:  Normal | Resolution:  worksforme
 Keywords: |  Actual Points:
Parent ID: | Points:
 Reviewer: |Sponsor:
---+
Changes (by atagar):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 Hi juga, that's not how you run Stem's tests. Please check...

 https://stem.torproject.org/faq.html#how-do-i-run-the-tests

 Use the '--test' argument if you would like to run only a single test.

 {{{
 % ./run_tests.py --unit --test descriptor.bandwidth_file
 ==
  INITIALISING
 ==

   stem version...1.7.1-dev (commit f1c6e30d)
   python version...  2.7.12
   operating system...Linux (Ubuntu 16.04)
   cryptography version...2.0.3
   pynacl version...  missing
   mock version...2.0.0
   pyflakes version...1.5.0
   pycodestyle version... 2.4.0
   checking for orphaned .pyc files...done (0.0s)
   checking for unused tests...   done (0.0s)
   importing test modules...  done (0.0s)

 ==
   UNIT TESTS
 ==

   descriptor.bandwidth_file... success (0.01s)

 TESTING PASSED (0 seconds)
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

[tor-bugs] #29352 [Core Tor/Stem]: AttributeError when running bandwidth_file.py test

2019-02-06 Thread Tor Bug Tracker & Wiki
#29352: AttributeError when running bandwidth_file.py test
---+
 Reporter:  juga   |  Owner:  atagar
 Type:  defect | Status:  new
 Priority:  Medium |  Milestone:
Component:  Core Tor/Stem  |Version:
 Severity:  Normal |   Keywords:
Actual Points: |  Parent ID:
   Points: |   Reviewer:
  Sponsor: |
---+
 Running `pytest test/unit/descriptor/bandwidth_file.py` both in Python 2.7
 and 3.5

 {{{
 test/unit/descriptor/bandwidth_file.py .FF..
 [100%]

 
 FAILURES
 
 __
 TestBandwidthFile.test_header_for_v1
 __

 self = 

 def test_header_for_v1(self):
   """
 Document version 1.0 predates headers, and as such should be
 prohibited.
 """

 > self.assertRaisesWith(ValueError, 'Headers require BandwidthFile
 version 1.1 or later', BandwidthFile.create, {'new_header': 'neat stuff'})
 E AttributeError: 'TestBandwidthFile' object has no attribute
 'assertRaisesWith'

 test/unit/descriptor/bandwidth_file.py:181: AttributeError
 
 TestBandwidthFile.test_invalid_timestamp
 

 self = 

 def test_invalid_timestamp(self):
   """
 Invalid timestamp values.
 """

   test_values = (
 b'',
 b'boo',
 b'123.4',
 b'-123',
   )

   for value in test_values:
 expected_exc = "First line should be a unix timestamp, but was
 '%s'" % value
 >   self.assertRaisesWith(ValueError, expected_exc,
 BandwidthFile.create, {'timestamp': value})
 E   AttributeError: 'TestBandwidthFile' object has no attribute
 'assertRaisesWith'

 test/unit/descriptor/bandwidth_file.py:209: AttributeError
 === 2 failed, 7 passed
 in 0.11 seconds ===
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs