def test_source_from_cache_bad_path(self): # When the path to a pyc file is not in PEP 3147 format, a ValueError # is raised. self.assertRaises( ValueError, imp.source_from_cache, '/foo/bar/bazqux.pyc')