Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(9) | Call(9) | Derive(0) | Import(0)
Fail immediately, with the given message.
src/s/k/skeleton-0.6/skeleton/tests/test_core.py skeleton(Download)
skel.check_variables() except KeyError: self.fail("check_variables() should not raise KayError " "if the missing variable has a default.")
try: skel.write(tmp_dir.path) self.fail("An exception should be raised") except (TemplateKeyError,), exc: self.assertTrue(exc.file_path.endswith('bar/baz.txt_tmpl'))
try: skel.write(tmp_dir.path) self.fail("An exception should be raised") except (FileNameKeyError,), exc: self.assertTrue(exc.file_path.endswith('bar/{baz}.txt'))
src/s/k/skeleton_stu-0.6.3/skeleton/tests/test_core.py skeleton_stu(Download)
skel.check_variables() except KeyError: self.fail("check_variables() should not raise KayError " "if the missing variable has a default.")
try: skel.write(tmp_dir.path) self.fail("An exception should be raised") except (TemplateKeyError,), exc: self.assertTrue(exc.file_path.endswith('bar/baz.txt_tmpl'))
try: skel.write(tmp_dir.path) self.fail("An exception should be raised") except (FileNameKeyError,), exc: self.assertTrue(exc.file_path.endswith('bar/{baz}.txt'))
src/s/k/skeleton-HEAD/skeleton/tests/test_core.py skeleton(Download)
skel.check_variables() except KeyError: self.fail("check_variables() should not raise KayError " "if the missing variable has a default.")
try: skel.write(tmp_dir.path) self.fail("An exception should be raised") except (TemplateKeyError,), exc: self.assertTrue(exc.file_path.endswith('bar/baz.txt_tmpl'))
try: skel.write(tmp_dir.path) self.fail("An exception should be raised") except (FileNameKeyError,), exc: self.assertTrue(exc.file_path.endswith('bar/{baz}.txt'))