mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
test: fix broken netifaces check
This will always return True on python2 [] > 1 On python3 it is instead an error, because you cannot compare a list to an int -- instead, we want to compare the length of the returned list, to see how many interfaces are available.
This commit is contained in:
parent
2271463d27
commit
2c156d3000
@ -254,7 +254,7 @@ class BuildTest(unittest.TestCase):
|
||||
|
||||
def test_netifaces(self):
|
||||
import netifaces
|
||||
self.assertGreaterEqual(netifaces.interfaces(), 1, 'netifaces could find no network interfaces')
|
||||
self.assertGreaterEqual(len(netifaces.interfaces()), 1, 'netifaces could find no network interfaces')
|
||||
|
||||
def test_psutil(self):
|
||||
import psutil
|
||||
|
Loading…
x
Reference in New Issue
Block a user