You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[tyler@toaster:~/Testify]$ PYTHONPATH=~/Testify ~/Testify/bin/testify -v tmp2.py --bucket=1
Traceback (most recent call last):
File "/Users/tyler/Testify/bin/testify", line 25, in <module>
test_program.TestProgram()
File "/Users/tyler/Testify/testify/test_program.py", line 222, in __init__
self.run()
File "/Users/tyler/Testify/testify/test_program.py", line 299, in run
result = runner.run()
File "/Users/tyler/Testify/testify/test_runner.py", line 133, in run
for test_case in self.discover():
File "/Users/tyler/Testify/testify/test_runner.py", line 108, in discover
discovered_tests = list(discover_inner())
File "/Users/tyler/Testify/testify/test_runner.py", line 93, in discover_inner
or (override_bucket is None and test_case_class._testify_bucket(self.bucket_count, self.bucket_salt) == self.bucket)
File "/Users/tyler/Testify/testify/test_case.py", line 80, in _testify_bucket
return hash(MetaTestCase._cmp_str(cls)) % bucket_count
TypeError: unsupported operand type(s) for %: 'int' and 'NoneType'
The offending code:
def _testify_bucket(cls, bucket_count, bucket_salt=None):
"""Bucket a TestCase using a relatively consistant hash - for dividing tests across runners."""
if bucket_salt:
return hash(MetaTestCase._cmp_str(cls) + bucket_salt) % bucket_count
else:
return hash(MetaTestCase._cmp_str(cls)) % bucket_count
Called during discovery.
Not sure if it's related but another oddity that I'm not going to chase further is what happened when I provided a bucket-count:
[tyler@toaster:~/Testify]$ PYTHONPATH=~/Testify ~/Testify/bin/testify -v tmp2.py --bucket=1 --bucket-count=1
No tests were discovered (tests must subclass TestCase and test methods must begin with 'test').
ERROR. 0 tests / 0 cases: 0 passed, 0 failed. (Total test time 0.00s)
The text was updated successfully, but these errors were encountered:
While working on #206, I discovered this.
The offending code:
Called during discovery.
Not sure if it's related but another oddity that I'm not going to chase further is what happened when I provided a bucket-count:
The text was updated successfully, but these errors were encountered: