def test_eq_subclass(self): class Subclass(MountConnection): pass c1 = MountConnection("id", "server:/path", "vfstype", "options") c2 = Subclass("id", "server:/path", "vfstype", "options") assert c1 != c2
def test_eq_subclass(self): class Subclass(MountConnection): pass c1 = MountConnection("id", "server:/path", "vfstype", "options") c2 = Subclass("id", "server:/path", "vfstype", "options") self.assertFalse(c1 == c2, "%s should not equal %s" % (c1, c2))
def test_subclass_different_hash(self): class Subclass(MountConnection): pass c1 = MountConnection("id", "server:/path", "vfstype", "options") c2 = Subclass("id", "server:/path", "vfstype", "options") self.assertNotEqual(hash(c1), hash(c2))
def test_eq_equal(self): c1 = MountConnection("id", "server:/path", "vfstype", "options") c2 = MountConnection("id", "server:/path", "vfstype", "options") self.assertTrue(c1 == c2, "%s should equal %s" % (c1, c2))
def test_normalize_local_path(self, spec, fs_spec, fs_file): con = MountConnection("id", spec, mountClass=FakeMount) self.assertEqual(con._mount.fs_spec, fs_spec) self.assertEqual(con._mount.fs_file, fs_file)
def test_not_equal_different_hash(self, i1, i2, s1, s2, t1, t2, o1, o2): c1 = MountConnection(i1, s1, t1, o1) c2 = MountConnection(i2, s2, t2, o2) self.assertNotEqual(hash(c1), hash(c2))
def test_equal_same_hash(self): c1 = MountConnection("id", "server:/path", "vfstype", "options") c2 = MountConnection("id", "server:/path", "vfstype", "options") self.assertEqual(hash(c1), hash(c2))
def test_eq_different(self, i1, i2, s1, s2, t1, t2, o1, o2): c1 = MountConnection(i1, s1, t1, o1) c2 = MountConnection(i2, s2, t2, o2) self.assertFalse(c1 == c2, "%s should not equal %s" % (c1, c2))
def test_eq_different(self, i1, i2, s1, s2, t1, t2, o1, o2): c1 = MountConnection(i1, s1, t1, o1) c2 = MountConnection(i2, s2, t2, o2) assert not c1 == c2
def test_eq_equal(self): c1 = MountConnection("id", "server:/path", "vfstype", "options") c2 = MountConnection("id", "server:/path", "vfstype", "options") assert c1 == c2
def test_normalize_local_path(self, spec, fs_spec, fs_file): con = MountConnection("id", spec, mountClass=FakeMount) assert con._mount.fs_spec == fs_spec assert con._mount.fs_file == fs_file
def test_not_equal_different_hash(self, i1, i2, s1, s2, t1, t2, o1, o2): c1 = MountConnection(i1, s1, t1, o1) c2 = MountConnection(i2, s2, t2, o2) assert hash(c1) != hash(c2)
def test_ne_equal(self): c1 = MountConnection("server:/path", "vfstype", "options") c2 = MountConnection("server:/path", "vfstype", "options") self.assertFalse(c1 != c2, "%s should equal %s" % (c1, c2))