{"id":43223,"date":"2025-07-30T16:36:10","date_gmt":"2025-07-30T07:36:10","guid":{"rendered":"https:\/\/techgym.jp\/?p=43223"},"modified":"2025-07-30T16:36:14","modified_gmt":"2025-07-30T07:36:14","slug":"python-pytest","status":"publish","type":"post","link":"https:\/\/techgym.jp\/column\/python-pytest\/","title":{"rendered":"Python\u306epytest\u3092\u5fb9\u5e95\u89e3\u8aac\uff01 \u30b7\u30f3\u30d7\u30eb\u3067\u5f37\u529b\u306a\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u6c7a\u5b9a\u7248"},"content":{"rendered":"\n<div id=\"model-response-message-contentr_57700930d9bc4dd0\" class=\"markdown markdown-main-panel stronger enable-updated-hr-color\" dir=\"ltr\"><br \/>\n<p>\u00a0<\/p>\n<p>\u3042\u306a\u305f\u304cPython\u3067\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3092\u5411\u4e0a\u3055\u305b\u305f\u3044\u3001\u3082\u3063\u3068\u52b9\u7387\u7684\u306b\u30d0\u30b0\u3092\u898b\u3064\u3051\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u305b\u3093\u304b\uff1f Python\u306b\u306f\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306e<code>unittest<\/code>\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3067\u300cPythonic\u300d\u306a\u8a18\u6cd5\u3067\u30c6\u30b9\u30c8\u3092\u66f8\u304d\u305f\u3044\u3001\u8c4a\u5bcc\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u30c6\u30b9\u30c8\u74b0\u5883\u3092\u62e1\u5f35\u3057\u305f\u3044\u3068\u3044\u3046\u30cb\u30fc\u30ba\u306b\u5fdc\u3048\u308b\u306e\u304c\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30e9\u30a4\u30d6\u30e9\u30ea\u306e**<code>pytest<\/code>**\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<code>pytest<\/code>\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u304b\u3089\u3001\u306a\u305c\u591a\u304f\u306e\u958b\u767a\u8005\u306b\u652f\u6301\u3055\u308c\u308b\u306e\u304b\u3001\u305d\u3057\u3066\u5b9f\u969b\u306b\u7c21\u5358\u306a\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u624b\u9806\u307e\u3067\u3001\u521d\u5fc3\u8005\u306e\u65b9\u306b\u3082\u5206\u304b\u308a\u3084\u3059\u304f\u5fb9\u5e95\u7684\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<code>pytest<\/code>\u3092\u30de\u30b9\u30bf\u30fc\u3057\u3066\u3001\u3042\u306a\u305f\u306ePython\u958b\u767a\u3092\u3088\u308a\u697d\u3057\u304f\u3001\u3088\u308a\u751f\u7523\u7684\u306b\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<hr \/>\n<p>\u00a0<\/p>\n<h2><code>pytest<\/code>\u3068\u306f\uff1f \u306a\u305c\u30b3\u30fc\u30c9\u306e\u30c6\u30b9\u30c8\u306b\u4f7f\u3046\u306e\u304b\uff1f<\/h2>\n<p>\u00a0<\/p>\n<p><b><code>pytest<\/code>\u306f\u3001Python\u3067\u66f8\u304b\u308c\u305f\u3001\u30b7\u30f3\u30d7\u30eb\u3067\u5f37\u529b\u306a\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<\/b>\u3067\u3059\u3002<code>unittest<\/code>\u3088\u308a\u3082\u7c21\u6f54\u306a\u8a18\u8ff0\u3067\u30c6\u30b9\u30c8\u304c\u66f8\u3051\u308b\u3053\u3068\u304c\u5927\u304d\u306a\u7279\u5fb4\u3067\u3001\u5c0f\u898f\u6a21\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u5927\u898f\u6a21\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u307e\u3067\u3001\u3042\u3089\u3086\u308b\u898f\u6a21\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u305c<code>pytest<\/code>\u3092\u4f7f\u3063\u3066\u30b3\u30fc\u30c9\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3046\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<ul>\n<li>\n<p><b>\u7c21\u6f54\u306a\u30c6\u30b9\u30c8\u8a18\u8ff0<\/b>: <code>unittest<\/code>\u306e\u3088\u3046\u306b<code>TestCase<\/code>\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u3001\u901a\u5e38\u306e\u95a2\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u30c6\u30b9\u30c8\u3092\u66f8\u3051\u307e\u3059\u3002\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u3082<code>assert<\/code>\u6587\u3092\u76f4\u63a5\u4f7f\u3048\u308b\u305f\u3081\u3001\u975e\u5e38\u306b\u76f4\u611f\u7684\u3067\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u8c4a\u5bcc\u306a\u6a5f\u80fd\u3068\u30d7\u30e9\u30b0\u30a4\u30f3<\/b>: \u30d5\u30a3\u30af\u30b9\u30c1\u30e3\uff08\u30c6\u30b9\u30c8\u306e\u6e96\u5099\u30fb\u5f8c\u51e6\u7406\uff09\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u5316\uff08\u8907\u6570\u306e\u5165\u529b\u3067\u540c\u3058\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\uff09\u3001\u30de\u30fc\u30ab\u30fc\uff08\u30c6\u30b9\u30c8\u306e\u5206\u985e\uff09\u3001\u30e2\u30c3\u30af\uff08\u5916\u90e8\u4f9d\u5b58\u306e\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\uff09\u306a\u3069\u3001\u30c6\u30b9\u30c8\u306b\u5fc5\u8981\u306a\u3042\u3089\u3086\u308b\u6a5f\u80fd\u304c\u6a19\u6e96\u3067\u3001\u307e\u305f\u306f\u8c4a\u5bcc\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u8aad\u307f\u3084\u3059\u3044\u30a8\u30e9\u30fc\u30ec\u30dd\u30fc\u30c8<\/b>: \u30c6\u30b9\u30c8\u304c\u5931\u6557\u3057\u305f\u5834\u5408\u3001\u3069\u3053\u3067\u4f55\u304c\u554f\u984c\u3060\u3063\u305f\u306e\u304b\u3092\u975e\u5e38\u306b\u5206\u304b\u308a\u3084\u3059\u304f\u8868\u793a\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u81ea\u52d5\u30c6\u30b9\u30c8\u691c\u51fa<\/b>: <code>test_<\/code>\u3067\u59cb\u307e\u308b\u30d5\u30a1\u30a4\u30eb\u3084\u95a2\u6570\u3092\u81ea\u52d5\u7684\u306b\u63a2\u3057\u51fa\u3057\u3001\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u65e2\u5b58\u306e\u30c6\u30b9\u30c8\u3068\u306e\u4e92\u63db\u6027<\/b>: <code>unittest<\/code>\u3067\u66f8\u304b\u308c\u305f\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3082<code>pytest<\/code>\u3067\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u6d3b\u767a\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3<\/b>: \u591a\u304f\u306e\u958b\u767a\u8005\u306b\u5229\u7528\u3055\u308c\u3066\u304a\u308a\u3001\u60c5\u5831\u3084\u30b5\u30dd\u30fc\u30c8\u304c\u8c4a\u5bcc\u3067\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<p>\u00a0<\/p>\n<h2><code>pytest<\/code>\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h2>\n<p>\u00a0<\/p>\n<p><code>pytest<\/code>\u3092\u4f7f\u3046\u306b\u306f\u3001\u307e\u305aPC\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002Python\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb<code>pip<\/code>\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<ol start=\"1\">\n<li>\n<p><b>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff08Windows\uff09<\/b> \u307e\u305f\u306f <b>\u30bf\u30fc\u30df\u30ca\u30eb\uff08macOS\/Linux\uff09<\/b> \u3092\u958b\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<div class=\"code-block ng-tns-c1455175435-776 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\">\n<div class=\"code-block-decoration header-formatted gds-title-s ng-tns-c1455175435-776 ng-star-inserted\"><span class=\"ng-tns-c1455175435-776\">Bash<\/span>\n<div class=\"buttons ng-tns-c1455175435-776 ng-star-inserted\">\u00a0<\/div>\n<\/div>\n<div class=\"formatted-code-block-internal-container ng-tns-c1455175435-776\">\n<div class=\"animated-opacity ng-tns-c1455175435-776\">\n<pre class=\"ng-tns-c1455175435-776\"><code class=\"code-container formatted ng-tns-c1455175435-776\" role=\"text\" data-test-id=\"code-content\">pip install pytest\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/li>\n<\/ol>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u6210\u529f\u3057\u305f\u304b\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001Python\u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u30b7\u30a7\u30eb\u3067<code>import pytest<\/code>\u3068\u5165\u529b\u3057\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u3051\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<hr \/>\n<p>\u00a0<\/p>\n<h2><code>pytest<\/code>\u3067\u30c6\u30b9\u30c8\u3092\u66f8\u304f\u57fa\u672c\u30b9\u30c6\u30c3\u30d7<\/h2>\n<p>\u00a0<\/p>\n<p><code>pytest<\/code>\u3067\u30c6\u30b9\u30c8\u3092\u66f8\u304f\u969b\u306e\u57fa\u672c\u7684\u306a\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ol start=\"1\">\n<li>\n<p><b><code>test_<\/code>\u3067\u59cb\u307e\u308b\u30d5\u30a1\u30a4\u30eb<\/b>\uff08\u4f8b: <code>test_my_module.py<\/code>\uff09\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u30c6\u30b9\u30c8\u3057\u305f\u3044\u5404\u6a5f\u80fd\u306b\u5bfe\u3057\u3066\u3001<b><code>test_<\/code>\u3067\u59cb\u307e\u308b\u95a2\u6570<\/b>\uff08\u307e\u305f\u306f\u30af\u30e9\u30b9\u5185\u306e\u30e1\u30bd\u30c3\u30c9\uff09\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u30c6\u30b9\u30c8\u95a2\u6570\u5185\u3067\u3001<b>Python\u6a19\u6e96\u306e<code>assert<\/code>\u6587<\/b>\u3092\u4f7f\u3063\u3066\u3001\u30b3\u30fc\u30c9\u306e\u51fa\u529b\u304c\u671f\u5f85\u901a\u308a\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u00a0<\/p>\n<h3>\u5177\u4f53\u4f8b\uff1a\u7c21\u5358\u306a\u95a2\u6570\u306e\u30c6\u30b9\u30c8<\/h3>\n<p>\u00a0<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u6587\u5b57\u5217\u3092\u64cd\u4f5c\u3059\u308b\u7c21\u5358\u306a\u95a2\u6570<code>reverse_string<\/code>\u3068<code>is_palindrome<\/code>\u3092\u4f5c\u6210\u3057\u3001<code>pytest<\/code>\u3067\u305d\u306e\u30c6\u30b9\u30c8\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"code-block ng-tns-c1455175435-777 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\">\n<div class=\"code-block-decoration header-formatted gds-title-s ng-tns-c1455175435-777 ng-star-inserted\"><span class=\"ng-tns-c1455175435-777\">Python<\/span>\n<div class=\"buttons ng-tns-c1455175435-777 ng-star-inserted\">\u00a0<\/div>\n<\/div>\n<div class=\"formatted-code-block-internal-container ng-tns-c1455175435-777\">\n<div class=\"animated-opacity ng-tns-c1455175435-777\">\n<pre class=\"ng-tns-c1455175435-777\"><code class=\"code-container formatted ng-tns-c1455175435-777\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># string_utils.py (\u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u30b3\u30fc\u30c9)<\/span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">reverse_string<\/span>(<span class=\"hljs-params\">s<\/span>):<\/span>\n    <span class=\"hljs-string\">\"\"\"\u6587\u5b57\u5217\u3092\u53cd\u8ee2\u3055\u305b\u308b\u95a2\u6570\"\"\"<\/span>\n    <span class=\"hljs-keyword\">return<\/span> s[::-<span class=\"hljs-number\">1<\/span>]\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">is_palindrome<\/span>(<span class=\"hljs-params\">s<\/span>):<\/span>\n    <span class=\"hljs-string\">\"\"\"\u6587\u5b57\u5217\u304c\u56de\u6587\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u95a2\u6570\"\"\"<\/span>\n    cleaned_s = s.lower().replace(<span class=\"hljs-string\">\" \"<\/span>, <span class=\"hljs-string\">\"\"<\/span>)\n    <span class=\"hljs-keyword\">return<\/span> cleaned_s == reverse_string(cleaned_s)\n\n<span class=\"hljs-comment\"># test_string_utils.py (\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9)<\/span>\n<span class=\"hljs-comment\"># \u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u95a2\u6570\u3092\u30a4\u30f3\u30dd\u30fc\u30c8<\/span>\n<span class=\"hljs-keyword\">from<\/span> string_utils <span class=\"hljs-keyword\">import<\/span> reverse_string, is_palindrome\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_reverse_string_basic<\/span>():<\/span>\n    <span class=\"hljs-comment\"># assert \u5b9f\u969b\u306e\u5024 == \u671f\u5f85\u3055\u308c\u308b\u5024<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> reverse_string(<span class=\"hljs-string\">\"hello\"<\/span>) == <span class=\"hljs-string\">\"olleh\"<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_reverse_string_empty<\/span>():<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> reverse_string(<span class=\"hljs-string\">\"\"<\/span>) == <span class=\"hljs-string\">\"\"<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_reverse_string_with_spaces<\/span>():<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> reverse_string(<span class=\"hljs-string\">\"a b c\"<\/span>) == <span class=\"hljs-string\">\"c b a\"<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_is_palindrome_true<\/span>():<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> is_palindrome(<span class=\"hljs-string\">\"madam\"<\/span>) <span class=\"hljs-keyword\">is<\/span> <span class=\"hljs-literal\">True<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> is_palindrome(<span class=\"hljs-string\">\"A man a plan a canal Panama\"<\/span>) <span class=\"hljs-keyword\">is<\/span> <span class=\"hljs-literal\">True<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_is_palindrome_false<\/span>():<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> is_palindrome(<span class=\"hljs-string\">\"python\"<\/span>) <span class=\"hljs-keyword\">is<\/span> <span class=\"hljs-literal\">False<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> is_palindrome(<span class=\"hljs-string\">\"hello world\"<\/span>) <span class=\"hljs-keyword\">is<\/span> <span class=\"hljs-literal\">False<\/span>\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p>\u00a0<\/p>\n<h3>\u30c6\u30b9\u30c8\u306e\u5b9f\u884c\u65b9\u6cd5<\/h3>\n<p>\u00a0<\/p>\n<ol start=\"1\">\n<li>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u305d\u308c\u305e\u308c<code>string_utils.py<\/code>\u3068<code>test_string_utils.py<\/code>\u3068\u3044\u3046\u540d\u524d\u3067\u540c\u3058\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u307e\u305f\u306f\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u3001\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<div class=\"code-block ng-tns-c1455175435-778 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\">\n<div class=\"code-block-decoration header-formatted gds-title-s ng-tns-c1455175435-778 ng-star-inserted\"><span class=\"ng-tns-c1455175435-778\">Bash<\/span>\n<div class=\"buttons ng-tns-c1455175435-778 ng-star-inserted\">\u00a0<\/div>\n<\/div>\n<div class=\"formatted-code-block-internal-container ng-tns-c1455175435-778\">\n<div class=\"animated-opacity ng-tns-c1455175435-778\">\n<pre class=\"ng-tns-c1455175435-778\"><code class=\"code-container formatted ng-tns-c1455175435-778\" role=\"text\" data-test-id=\"code-content\">pytest\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><code>pytest<\/code>\u30b3\u30de\u30f3\u30c9\u306f\u3001\u73fe\u5728\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u305d\u306e\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u3001<code>test_<\/code>\u3067\u59cb\u307e\u308b\u30d5\u30a1\u30a4\u30eb\u3001\u307e\u305f\u306f<code>_test.py<\/code>\u3067\u7d42\u308f\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u7684\u306b\u63a2\u3057\u51fa\u3057\u3001\u305d\u306e\u4e2d\u306e<code>test_<\/code>\u3067\u59cb\u307e\u308b\u95a2\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u00a0<\/p>\n<h4>\u5b9f\u884c\u7d50\u679c\u4f8b<\/h4>\n<p>\u00a0<\/p>\n<div class=\"code-block ng-tns-c1455175435-779 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\">\n<div class=\"formatted-code-block-internal-container ng-tns-c1455175435-779\">\n<div class=\"animated-opacity ng-tns-c1455175435-779\">\n<pre class=\"ng-tns-c1455175435-779\"><code class=\"code-container formatted ng-tns-c1455175435-779 no-decoration-radius\" role=\"text\" data-test-id=\"code-content\">============================= test session starts ==============================\nplatform win32 -- Python 3.9.13, pytest-7.1.2, pluggy-1.0.0\nrootdir: C:\\Users\\your_user\\my_project\ncollected 6 items\n\ntest_string_utils.py ......                                              [100%]\n\n============================== 6 passed in 0.01s ===============================\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><code>6 passed<\/code>\u3068\u8868\u793a\u3055\u308c\u308c\u3070\u3001\u5168\u3066\u306e\u30c6\u30b9\u30c8\u304c\u6210\u529f\u3057\u305f\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u3082\u3057\u30a8\u30e9\u30fc\u304c\u3042\u308c\u3070\u3001\u3069\u306e\u30c6\u30b9\u30c8\u304c\u5931\u6557\u3057\u305f\u304b\u3001\u5931\u6557\u3057\u305f\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\uff08\u4f8b: <code>assert 'olleh' == 'hello'<\/code>\u306e\u3088\u3046\u306a\u6bd4\u8f03\u307e\u3067\uff09\u304c\u975e\u5e38\u306b\u5206\u304b\u308a\u3084\u3059\u304f\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<hr \/>\n<p>\u00a0<\/p>\n<h2><code>pytest<\/code>\u306e\u4fbf\u5229\u306a\u6a5f\u80fd<\/h2>\n<p>\u00a0<\/p>\n<p><code>pytest<\/code>\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u8a18\u8ff0\u3060\u3051\u3067\u306a\u304f\u3001\u30c6\u30b9\u30c8\u3092\u3088\u308a\u52b9\u7387\u7684\u304b\u3064\u67d4\u8edf\u306b\u66f8\u304f\u305f\u3081\u306e\u5f37\u529b\u306a\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<h3>1. \u30d5\u30a3\u30af\u30b9\u30c1\u30e3\uff08Fixtures\uff09<\/h3>\n<p>\u00a0<\/p>\n<p>\u30d5\u30a3\u30af\u30b9\u30c1\u30e3\u306f\u3001\u30c6\u30b9\u30c8\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\uff08\u6e96\u5099\uff09\u3068\u30c6\u30a3\u30a2\u30c0\u30a6\u30f3\uff08\u5f8c\u51e6\u7406\uff09\u3092\u5171\u901a\u5316\u3057\u3001\u30c6\u30b9\u30c8\u95a2\u6570\u306b\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059\u3053\u3068\u3067\u5229\u7528\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\u3001\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u306e\u751f\u6210\u306a\u3069\u3001\u69d8\u3005\u306a\u4e8b\u524d\u6e96\u5099\u30fb\u4e8b\u5f8c\u51e6\u7406\u3092\u7c21\u6f54\u306b\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"code-block ng-tns-c1455175435-780 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\">\n<div class=\"code-block-decoration header-formatted gds-title-s ng-tns-c1455175435-780 ng-star-inserted\"><span class=\"ng-tns-c1455175435-780\">Python<\/span>\n<div class=\"buttons ng-tns-c1455175435-780 ng-star-inserted\">\u00a0<\/div>\n<\/div>\n<div class=\"formatted-code-block-internal-container ng-tns-c1455175435-780\">\n<div class=\"animated-opacity ng-tns-c1455175435-780\">\n<pre class=\"ng-tns-c1455175435-780\"><code class=\"code-container formatted ng-tns-c1455175435-780\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># test_db_ops.py<\/span>\n<span class=\"hljs-keyword\">import<\/span> pytest\n<span class=\"hljs-keyword\">import<\/span> os\n\n<span class=\"hljs-comment\"># \u30d5\u30a3\u30af\u30b9\u30c1\u30e3\u306e\u5b9a\u7fa9<\/span>\n<span class=\"hljs-meta\">@pytest.fixture<\/span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">temp_file<\/span>(<span class=\"hljs-params\">tmp_path<\/span>):<\/span> <span class=\"hljs-comment\"># tmp_path \u306f pytest \u63d0\u4f9b\u306e\u4e00\u6642\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30d5\u30a3\u30af\u30b9\u30c1\u30e3<\/span>\n    <span class=\"hljs-string\">\"\"\"\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u30c6\u30b9\u30c8\u5f8c\u306b\u524a\u9664\u3059\u308b\u30d5\u30a3\u30af\u30b9\u30c1\u30e3\"\"\"<\/span>\n    file_path = tmp_path \/ <span class=\"hljs-string\">\"my_temp_test.txt\"<\/span>\n    file_path.write_text(<span class=\"hljs-string\">\"Test data for temp file.\"<\/span>)\n    print(<span class=\"hljs-string\">f\"\\nCreated temporary file: <span class=\"hljs-subst\">{file_path}<\/span>\"<\/span>)\n    <span class=\"hljs-keyword\">yield<\/span> file_path <span class=\"hljs-comment\"># \u3053\u3053\u3067\u30c6\u30b9\u30c8\u95a2\u6570\u306b\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3092\u6e21\u3059<\/span>\n    os.remove(file_path) <span class=\"hljs-comment\"># \u30c6\u30b9\u30c8\u5f8c\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664<\/span>\n    print(<span class=\"hljs-string\">f\"Removed temporary file: <span class=\"hljs-subst\">{file_path}<\/span>\"<\/span>)\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_read_temp_file<\/span>(<span class=\"hljs-params\">temp_file<\/span>):<\/span> <span class=\"hljs-comment\"># \u30d5\u30a3\u30af\u30b9\u30c1\u30e3\u540d\u3092\u5f15\u6570\u306b\u6307\u5b9a<\/span>\n    content = temp_file.read_text()\n    <span class=\"hljs-keyword\">assert<\/span> content == <span class=\"hljs-string\">\"Test data for temp file.\"<\/span>\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><code>pytest test_db_ops.py -s<\/code> (<code>-s<\/code>\u306fprint\u51fa\u529b\u3092\u8868\u793a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3) \u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u30d5\u30a3\u30af\u30b9\u30c1\u30e3\u306e\u52d5\u4f5c\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<h3>2. \u30d1\u30e9\u30e1\u30fc\u30bf\u5316\uff08Parameterized Tests\uff09<\/h3>\n<p>\u00a0<\/p>\n<p>\u540c\u3058\u30c6\u30b9\u30c8\u30ed\u30b8\u30c3\u30af\u3092\u8907\u6570\u306e\u7570\u306a\u308b\u5165\u529b\u5024\u3067\u5b9f\u884c\u3057\u305f\u3044\u5834\u5408\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<div class=\"code-block ng-tns-c1455175435-781 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\">\n<div class=\"code-block-decoration header-formatted gds-title-s ng-tns-c1455175435-781 ng-star-inserted\"><span class=\"ng-tns-c1455175435-781\">Python<\/span>\n<div class=\"buttons ng-tns-c1455175435-781 ng-star-inserted\">\u00a0<\/div>\n<\/div>\n<div class=\"formatted-code-block-internal-container ng-tns-c1455175435-781\">\n<div class=\"animated-opacity ng-tns-c1455175435-781\">\n<pre class=\"ng-tns-c1455175435-781\"><code class=\"code-container formatted ng-tns-c1455175435-781\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-comment\"># test_math.py<\/span>\n<span class=\"hljs-keyword\">import<\/span> pytest\n\n<span class=\"hljs-meta\">@pytest.mark.parametrize(<span class=\"hljs-params\"><span class=\"hljs-string\">\"a, b, expected\"<\/span>, [\n    (<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">3<\/span>),      <span class=\"hljs-comment\"># 1 + 2 = 3<\/span>\n    (<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">0<\/span>),      <span class=\"hljs-comment\"># 0 + 0 = 0<\/span>\n    (-<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">0<\/span>),     <span class=\"hljs-comment\"># -1 + 1 = 0<\/span>\n    (-<span class=\"hljs-number\">5<\/span>, -<span class=\"hljs-number\">3<\/span>, -<span class=\"hljs-number\">8<\/span>)    <span class=\"hljs-comment\"># -5 + -3 = -8<\/span>\n]<\/span>)<\/span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_add_numbers<\/span>(<span class=\"hljs-params\">a, b, expected<\/span>):<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> (a + b) == expected\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<p><code>pytest<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u3053\u306e1\u3064\u306e\u30c6\u30b9\u30c8\u95a2\u6570\u304c4\u3064\u306e\u7570\u306a\u308b\u5165\u529b\u3067\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u00a0<\/p>\n<h3>3. \u30c6\u30b9\u30c8\u306e\u30b9\u30ad\u30c3\u30d7\u3068\u5931\u6557\u306e\u30de\u30fc\u30af<\/h3>\n<p>\u00a0<\/p>\n<p>\u7279\u5b9a\u306e\u30c6\u30b9\u30c8\u3092\u4e00\u6642\u7684\u306b\u30b9\u30ad\u30c3\u30d7\u3057\u305f\u308a\u3001\u610f\u56f3\u7684\u306b\u5931\u6557\u3059\u308b\u30c6\u30b9\u30c8\u3068\u3057\u3066\u30de\u30fc\u30af\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"code-block ng-tns-c1455175435-782 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation\">\n<div class=\"code-block-decoration header-formatted gds-title-s ng-tns-c1455175435-782 ng-star-inserted\"><span class=\"ng-tns-c1455175435-782\">Python<\/span>\n<div class=\"buttons ng-tns-c1455175435-782 ng-star-inserted\">\u00a0<\/div>\n<\/div>\n<div class=\"formatted-code-block-internal-container ng-tns-c1455175435-782\">\n<div class=\"animated-opacity ng-tns-c1455175435-782\">\n<pre class=\"ng-tns-c1455175435-782\"><code class=\"code-container formatted ng-tns-c1455175435-782\" role=\"text\" data-test-id=\"code-content\"><span class=\"hljs-keyword\">import<\/span> pytest\n<span class=\"hljs-keyword\">import<\/span> sys\n\n<span class=\"hljs-meta\">@pytest.mark.skip(<span class=\"hljs-params\">reason=<span class=\"hljs-string\">\"\u3053\u306e\u6a5f\u80fd\u306f\u307e\u3060\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\"<\/span><\/span>)<\/span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_unfinished_feature<\/span>():<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> <span class=\"hljs-literal\">False<\/span> <span class=\"hljs-comment\"># \u3053\u306e\u30c6\u30b9\u30c8\u306f\u5b9f\u884c\u3055\u308c\u306a\u3044<\/span>\n\n<span class=\"hljs-meta\">@pytest.mark.skipif(<span class=\"hljs-params\">sys.version_info &lt; (<span class=\"hljs-number\">3<\/span>, <span class=\"hljs-number\">9<\/span>), reason=<span class=\"hljs-string\">\"Python 3.9\u4ee5\u4e0a\u304c\u5fc5\u8981\u3067\u3059\"<\/span><\/span>)<\/span>\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title\">test_python_version_specific_feature<\/span>():<\/span>\n    <span class=\"hljs-keyword\">assert<\/span> <span class=\"hljs-literal\">True<\/span>\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<hr \/>\n<p>\u00a0<\/p>\n<h2><code>pytest<\/code>\u3068<code>unittest<\/code>\u306e\u4f7f\u3044\u5206\u3051<\/h2>\n<p>\u00a0<\/p>\n<p>\u3069\u3061\u3089\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3082Python\u3067\u30c6\u30b9\u30c8\u3092\u66f8\u304f\u305f\u3081\u306b\u5229\u7528\u3067\u304d\u307e\u3059\u304c\u3001\u4e00\u822c\u7684\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u4f7f\u3044\u5206\u3051\u304c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>\n<p><b><code>unittest<\/code><\/b>:<\/p>\n<ul>\n<li>\n<p>Python\u306e\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308b\u305f\u3081\u3001\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e0d\u8981\u3002<\/p>\n<\/li>\n<li>\n<p>Java\u306eJUnit\u304b\u3089\u306e\u79fb\u884c\u8005\u306b\u306f\u99b4\u67d3\u307f\u3084\u3059\u3044\u3002<\/p>\n<\/li>\n<li>\n<p>\u8907\u96d1\u306a\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u30ed\u30b8\u30c3\u30af\u3092\u5fc5\u8981\u3068\u3059\u308b\u5834\u5408\u306b\u30af\u30e9\u30b9\u30d9\u30fc\u30b9\u306e\u69cb\u9020\u304c\u5f79\u7acb\u3064\u3053\u3068\u304c\u3042\u308b\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><b><code>pytest<\/code><\/b>:<\/p>\n<ul>\n<li>\n<p><b>\u3088\u308a\u7c21\u6f54\u3067Pythonic\u306a\u30c6\u30b9\u30c8\u8a18\u8ff0<\/b>\u3092\u597d\u3080\u5834\u5408\u3002<\/p>\n<\/li>\n<li>\n<p><code>assert<\/code>\u6587\u3092\u76f4\u63a5\u4f7f\u3044\u305f\u3044\u5834\u5408\u3002<\/p>\n<\/li>\n<li>\n<p>\u8c4a\u5bcc\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3092\u6d3b\u7528\u3057\u305f\u3044\u5834\u5408\u3002<\/p>\n<\/li>\n<li>\n<p>\u5206\u304b\u308a\u3084\u3059\u3044\u30a8\u30e9\u30fc\u30ec\u30dd\u30fc\u30c8\u3092\u91cd\u8996\u3059\u308b\u5834\u5408\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u591a\u304f\u306ePython\u958b\u767a\u8005\u306f\u3001\u305d\u306e\u7c21\u6f54\u3055\u3068\u5f37\u529b\u306a\u6a5f\u80fd\u304b\u3089\u3001\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f<code>pytest<\/code>\u3092\u9078\u629e\u3059\u308b\u50be\u5411\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<hr \/>\n<p>\u00a0<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u00a0<\/p>\n<p><code>pytest<\/code>\u306f\u3001Python\u3067\u52b9\u7387\u7684\u304b\u3064\u697d\u3057\u304f\u30c6\u30b9\u30c8\u3092\u66f8\u304f\u305f\u3081\u306e\u975e\u5e38\u306b\u5f37\u529b\u306a\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u305d\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u8a18\u8ff0\u3068\u8c4a\u5bcc\u306a\u6a5f\u80fd\u306b\u3088\u308a\u3001\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3092\u98db\u8e8d\u7684\u306b\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\n<p><b>\u7c21\u6f54\u306a<code>assert<\/code>\u6587<\/b>\u3067\u30c6\u30b9\u30c8\u3092\u8a18\u8ff0\u3067\u304d\u308b\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u30d5\u30a3\u30af\u30b9\u30c1\u30e3<\/b>\u3067\u30c6\u30b9\u30c8\u306e\u6e96\u5099\u30fb\u5f8c\u51e6\u7406\u3092\u67d4\u8edf\u306b\u7ba1\u7406\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u30d1\u30e9\u30e1\u30fc\u30bf\u5316<\/b>\u3067\u540c\u3058\u30c6\u30b9\u30c8\u3092\u8907\u6570\u30c7\u30fc\u30bf\u3067\u5b9f\u884c\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u81ea\u52d5\u30c6\u30b9\u30c8\u691c\u51fa<\/b>\u3067\u5b9f\u884c\u304c\u5bb9\u6613\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u512a\u308c\u305f\u30a8\u30e9\u30fc\u30ec\u30dd\u30fc\u30c8<\/b>\u3067\u30c7\u30d0\u30c3\u30b0\u304c\u697d\u3002<\/p>\n<\/li>\n<li>\n<p><b>\u8c4a\u5bcc\u306a\u30d7\u30e9\u30b0\u30a4\u30f3<\/b>\u3067\u6a5f\u80fd\u3092\u62e1\u5f35\u3067\u304d\u308b\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u305c\u3072\u4eca\u65e5\u5b66\u3093\u3060<code>pytest<\/code>\u306e\u77e5\u8b58\u3092\u6d3b\u304b\u3057\u3066\u3001\u3042\u306a\u305f\u306ePython\u30b3\u30fc\u30c9\u306b\u30c6\u30b9\u30c8\u3092\u5c0e\u5165\u3057\u3001\u5805\u7262\u3067\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<hr \/>\n<p>\u00a0<\/p>\n<\/div>\n\n\n\n<p>\u25a0\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"Pcs4naEUgy\"><a href=\"https:\/\/techgym.jp\/column\/ori-app\/\">\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/column\/ori-app\/embed\/#?secret=xJsihnW8x7#?secret=Pcs4naEUgy\" data-secret=\"Pcs4naEUgy\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0AI\u6642\u4ee3\u306e\u7b2c\u4e00\u6b69\uff01\u300cAI\u99c6\u52d5\u958b\u767a\u30b3\u30fc\u30b9\u300d\u306f\u3058\u3081\u307e\u3057\u305f\uff01<\/p>\n\n\n\n<p>\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821\u3067\u5148\u884c\u958b\u59cb\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"CTERzFdcfZ\"><a href=\"https:\/\/techgym.jp\/about\/ai-driven-development\/\">AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/about\/ai-driven-development\/embed\/#?secret=lYPYaiBwTo#?secret=CTERzFdcfZ\" data-secret=\"CTERzFdcfZ\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/p>\n\n\n\n<p>\u300c\u6b66\u7530\u587e\u300d\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u7248\u3068\u3044\u3048\u3070\u300c\u30c6\u30c3\u30af\u30b8\u30e0\u300d\u3002<br>\u8b1b\u7fa9\u52d5\u753b\u306a\u3057\u3001\u6559\u79d1\u66f8\u306a\u3057\u3002\u300c\u9032\u6357\u7ba1\u7406\u3068\u30b3\u30fc\u30c1\u30f3\u30b0\u300d\u3067\u52b9\u7387\u5b66\u7fd2\u3002<br>\u3088\u308a\u65e9\u304f\u3001\u3088\u308a\u5b89\u304f\u3001\u3057\u304b\u3082\u5bfe\u9762\u578b\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"9vG7FZiaVc\"><a href=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/\">\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/embed\/#?secret=ZVUlLFt7DY#?secret=9vG7FZiaVc\" data-secret=\"9vG7FZiaVc\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u77ed\u671f\u8b1b\u7fd2\uff1e5\u65e5\u30675\u4e07\u5186\u306e\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u958b\u50ac\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"Ze6YtYLCZy\"><a href=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/\">\u72ec\u5b66\u3082\u30aa\u30f3\u30e9\u30a4\u30f3\u3082\u7121\u7406\u3060\u304b\u3089\u3001\u6709\u7d66\u3068\u3063\u3066\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u3078\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u72ec\u5b66\u3082\u30aa\u30f3\u30e9\u30a4\u30f3\u3082\u7121\u7406\u3060\u304b\u3089\u3001\u6709\u7d66\u3068\u3063\u3066\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u3078\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/embed\/#?secret=LnQqzIJuKQ#?secret=Ze6YtYLCZy\" data-secret=\"Ze6YtYLCZy\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u67081\u958b\u50ac\uff1e\u653e\u9001\u4f5c\u5bb6\u306b\u3088\u308b\u6620\u50cf\u30c7\u30a3\u30ec\u30af\u30bf\u30fc\u990a\u6210\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"UebAV5BbH9\"><a href=\"https:\/\/techgym.jp\/event\/video_director\/\">\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/video_director\/embed\/#?secret=0JdMW4l4Fh#?secret=UebAV5BbH9\" data-secret=\"UebAV5BbH9\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u30aa\u30f3\u30e9\u30a4\u30f3\u7121\u6599\uff1e\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"PbB7tybEvn\"><a href=\"https:\/\/techgym.jp\/tokyo_python\/\">\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7\uff08\u7406\u7cfb\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u521d\u5fc3\u8005\u5411\u3051\uff09<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7\uff08\u7406\u7cfb\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u521d\u5fc3\u8005\u5411\u3051\uff09&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo_python\/embed\/#?secret=oE6lulHSmX#?secret=PbB7tybEvn\" data-secret=\"PbB7tybEvn\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u3042\u306a\u305f\u304cPython\u3067\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3092\u5411\u4e0a\u3055\u305b\u305f\u3044\u3001\u3082\u3063\u3068\u52b9\u7387\u7684\u306b\u30d0\u30b0\u3092\u898b\u3064\u3051\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u305b\u3093\u304b\uff1f Python\u306b\u306f\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306eunittest\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3067\u300cPythonic\u300d\u306a\u8a18\u6cd5\u3067\u30c6\u30b9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42501,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-43223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-column"],"views":48,"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/07\/f3403acf5c65aedec0dba821c4c26404.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/43223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/comments?post=43223"}],"version-history":[{"count":0,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/43223\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media\/42501"}],"wp:attachment":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media?parent=43223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/categories?post=43223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/tags?post=43223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}