test_util: free-space can be a 'long'

This commit is contained in:
Brian Warner 2017-02-24 18:30:11 -08:00
parent 71f34e4f5b
commit cf9053637c

View File

@ -1,4 +1,5 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import six
import unicodedata import unicodedata
from twisted.trial import unittest from twisted.trial import unittest
from .. import util from .. import util
@ -42,7 +43,8 @@ class Utils(unittest.TestCase):
class Space(unittest.TestCase): class Space(unittest.TestCase):
def test_free_space(self): def test_free_space(self):
free = util.estimate_free_space(".") free = util.estimate_free_space(".")
self.assert_(isinstance(free, (int, type(None))), repr(free)) self.assert_(isinstance(free, six.integer_types + (type(None),)),
repr(free))
# some platforms (I think the VMs used by travis are in this # some platforms (I think the VMs used by travis are in this
# category) return 0, and windows will return None, so don't assert # category) return 0, and windows will return None, so don't assert
# anything more specific about the return value # anything more specific about the return value