etingof / pysmi

SNMP MIB parser
http://snmplabs.com/pysmi/
BSD 2-Clause "Simplified" License
137 stars 52 forks source link

TypeError in test_objecttype_smiv2_pysnmp.ObjectTypeWithStringSizeConstraintTestCase #32

Closed neirbowj closed 6 years ago

neirbowj commented 6 years ago

The test suite generates this error (3 of 3) when run against the latest version of pysnmp available in the FreeBSD ports tree (4.3.2), but test-requirements.txt does not stipulate a minimum version. This is reproducible with Python version 2.7.15, 3.4.8, 3.5.5, and 3.6.5, and shown here with the latter.

======================================================================
ERROR: testObjectTypeSyntax (test_objecttype_smiv2_pysnmp.ObjectTypeWithStringSizeConstraintTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/net-mgmt/py-pysmi/work-py36/pysmi-0.3.0/tests/test_objecttype_smiv2_pysnmp.py", line 326, in setUp
    exec(codeobj, self.ctx, self.ctx)
  File "test", line 7, in <module>
  File "/usr/local/lib/python3.6/site-packages/pysnmp/proto/rfc1902.py", line 201, in subtype
    self, value, implicitTag, explicitTag, subtypeSpec
TypeError: subtype() takes from 1 to 2 positional arguments but 5 were given
etingof commented 6 years ago

Fixed test-requirements.txt in commit 4f38bd4f2235ff50faa1dc69228be752b591b58e.