Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #29352

Closed
Open
Created Feb 06, 2019 by juga @juga

AttributeError when running bandwidth_file.py test

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 = <test.unit.descriptor.bandwidth_file.TestBandwidthFile testMethod=test_header_for_v1>

    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 = <test.unit.descriptor.bandwidth_file.TestBandwidthFile testMethod=test_invalid_timestamp>

    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 =======================================================
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking