def test_dictionaryKeys(self):
        """
        Verify that path instances are usable as dictionary keys.
        """
        f1 = self.path.child(b'file1')
        f1prime = self.path.child(b'file1')
        f2 = self.path.child(b'file2')
        dictoid = {}
        dictoid[f1] = 3
        dictoid[f1prime] = 4
        self.assertEqual(dictoid[f1], 4)
        self.assertEqual(list(dictoid.keys()), [f1])
        self.assertIs(list(dictoid.keys())[0], f1)
        self.assertIsNot(list(dictoid.keys())[0], f1prime) # sanity check
        dictoid[f2] = 5
        self.assertEqual(dictoid[f2], 5)
        self.assertEqual(len(dictoid), 2)

        Verify that path instances are usable as dictionary keys.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py