{"id":1237,"date":"2020-05-09T00:00:50","date_gmt":"2020-05-08T15:00:50","guid":{"rendered":"https:\/\/www.ishikawasekkei.com\/?p=1237"},"modified":"2020-05-09T00:17:23","modified_gmt":"2020-05-08T15:17:23","slug":"python-programing-test-first2","status":"publish","type":"post","link":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/","title":{"rendered":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u3000\u4eca\u65e5\u3082\u898b\u306b\u6765\u3066\u304f\u3060\u3055\u3063\u3066\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u77f3\u5ddd\u3055\u3093\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000<a href=\"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/06\/python-programing-test-first\/\" class=\"aioseop-link\">\u524d\u56de<\/a>\u3001<a href=\"https:\/\/docs.python.org\/ja\/3\/library\/unittest.html\" class=\"aioseop-link\">unittest\u30e2\u30b8\u30e5\u30fc\u30eb<\/a>\u306e\u6982\u8981\u3092\u304a\u4f1d\u3048\u3057\u305f\u306e\u3067\u3059\u304c\u3001Mock\u306b\u3064\u3044\u3066\u304a\u4f1d\u3048\u3057\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002Mock\u306f\u3001\u30e2\u30c3\u30af\u3068\u304b\u30b9\u30bf\u30d6\u3068\u304b\u30d1\u30c3\u30c1\u3068\u304b\u3001\u3044\u308f\u3086\u308b\u3001\u4eee\u60f3\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7c21\u5358\u306b\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u901a\u5e38\u306f\u3001\u8ab0\u304b\u304c\u4f5c\u3063\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u305d\u306e\u7d50\u679c\u3092\u3082\u3068\u306b\u632f\u308b\u821e\u3044\u304c\u5909\u308f\u308b\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u3068\u304d\u306b\u3001\u81ea\u5206\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306b\u306a\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002\u81ea\u5206\u306e\u4f5c\u6210\u90e8\u5206\u306e\u307f\u3092\u30c6\u30b9\u30c8\u3057\u305f\u3044\u308f\u3051\u3067\u3059\u304b\u3089\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3053\u306e\u3088\u3046\u306a\u5024\u3092\u8fd4\u3057\u3066\u304f\u308b\u306f\u305a\u3001\u3068\u3044\u3046\u60f3\u5b9a\u304c\u3042\u3063\u3066\u3001\u305d\u306e\u60f3\u5b9a\u3092\u3082\u3068\u306b\u51e6\u7406\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u30c6\u30b9\u30c8\u3067\u306f\u3001\u305d\u306e\u60f3\u5b9a\u5024\u3092\u8fd4\u3057\u3066\u304f\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3042\u308c\u3070\u3088\u3044\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3067\u306f\u3001\u30c6\u30b9\u30c8\u99c6\u52d5\u958b\u767a\u306e\u5b9f\u8df5\u3092\u3057\u306a\u304c\u3089\u3001Mock\u3092\u4f7f\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u30c6\u30b9\u30c8\u99c6\u52d5\u958b\u767a\u306f\u3001\u30ec\u30c3\u30c9\u3001\u30b0\u30ea\u30fc\u30f3\u3001\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u304c1\u30b5\u30a4\u30af\u30eb\u3067\u3059\u306d\u3002unittest\u3060\u3068\u8272\u306f\u3064\u304d\u307e\u305b\u3093\u3051\u3069\u3001\u3061\u3087\u3063\u3068\u3084\u3063\u3066\u307f\u307e\u3059\u3002\u4eca\u56de\u306f\u73fe\u5728\u6642\u523b\u3092\u8fd4\u3057\u3066\u304f\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u60f3\u5b9a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3044\u3064\u3082\u306f\u51fa\u6765\u4e0a\u304c\u3063\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u8f09\u305b\u308b\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u3001\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c8\u3092\u8a66\u307f\u3066\u307f\u307e\u3059\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u307e\u305a\u306f\u3001\u60f3\u5b9a\u3059\u308b\u30c6\u30b9\u30c8\u3092\u66f8\u3044\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\nimport unittest\n\nclass MyWatchTest(unittest.TestCase):\n    def setUp(self):\n        self.mywatch = MyWatch()\n    def tearDown(self):\n        del(self.mywatch)\n    def test_time(self):\n        self.assertEqual(self.mywatch.time() == \"12:05:20\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u306f\u3044\u3001\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u304a\u3084\uff1f\u4f55\u3082\u8d77\u304d\u307e\u305b\u3093\u3002\u3002\u3002\u304a\u3001\u305d\u3046\u305d\u3046\u3001\u30e1\u30a4\u30f3\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304d\u5fd8\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u6700\u5f8c\u306b\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">if __name__ == \"__main__\":\n    unittest.main()<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u306f\u3044\u3001\u518d\u5ea6\u3001\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u30a8\u30e9\u30fc\u306f\u767a\u751f\u3057\u305f\u306e\u3067\u3059\u3051\u3069\u3001\u3001\u3001\u524d\u56de\u52d5\u304b\u3057\u305f\u30c6\u30b9\u30c8\u3082\u3044\u3063\u3057\u3087\u306b\u52d5\u3044\u3066\u3044\u307e\u3059\u3002\u306a\u305c\u3067\u3057\u3087\u3046\u304b\u3002\u3002\u3002\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000dir()\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3001\u524d\u56de\u4f5c\u6210\u3057\u305f\u30c6\u30b9\u30c8\u7528\u306e\u30af\u30e9\u30b9\u300cMyFirstTestCase\u300d\u304c\u6b8b\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">In [36]: dir()\nOut[36]: \n['In',\n 'MyFirstTestCase',\n 'MyWatchTest',\n 'Out',\n '_',\n '_10',\n '_16',\n... \u4ee5\u4e0b\u7565<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3068\u3001\u3044\u3046\u3053\u3068\u3067\u3001\u300cMyFirstTestCase\u300d\u3092\u524a\u9664\u3057\u3066\u3001\u3082\u3046\u4e00\u5ea6\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">In [37]: del(MyFirstTestCase)\n\nIn [38]: runfile('C:\/work\/tkinter_example\/mywatchtest.py', wdir='C:\/work\/tkinter_example')\nE\n======================================================================\nERROR: test_time (__main__.MyWatchTest)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"C:\/work\/tkinter_example\/mywatchtest.py\", line 11, in setUp\n    self.mywatch = MyWatch()\nNameError: name 'MyWatch' is not defined\n\n----------------------------------------------------------------------\nRan 1 test in 0.002s\n\nFAILED (errors=1)\n\nIn [39]: <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u306f\u3044\u3001\u671b\u307f\u901a\u308a\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30af\u30e9\u30b9\u304c\u4f5c\u3089\u308c\u3066\u3044\u306a\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u306d\u3002\u5f53\u7136\u3067\u3059\u3002\u30af\u30e9\u30b9\u3092\u3064\u304f\u3063\u3066\u3001\u30a8\u30e9\u30fc\u3092\u53d6\u308a\u9664\u304d\u307e\u3059\u3002\u305d\u308c\u306b\u3057\u3066\u3082\u3001unittest\u306f\u81ea\u52d5\u7684\u306b\u30c6\u30b9\u30c8\u3092\u63a2\u3057\u51fa\u3057\u3066\u5b9f\u884c\u3057\u3066\u304f\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MyWatch.py<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u6642\u523b\u3092\u8fd4\u3059\u30d7\u30ed\u30b0\u30e9\u30e0\nclass MyWatch():\n    pass<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3068\u308a\u3042\u3048\u305a\u3001\u30af\u30e9\u30b9\u3092\u3064\u304f\u3063\u3066\u6700\u521d\u306e\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3002\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3002\u30a8\u30e9\u30fc\u5185\u5bb9\u304c\u5909\u308f\u308a\u307e\u305b\u3093\u3002\u3002\u3002\u4f5c\u3063\u305f\u306e\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u5b9f\u884c\u3059\u308b\u3068\u304d\u306b\u3001<code>import<\/code>\u304c\u5fc5\u8981\u3067\u3059\u306d\u3002<code>import unittest<\/code>\u306e\u4e0b\u306b\u4e00\u884c\u8ffd\u52a0\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import MyWatch<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u518d\u5ea6\u3001\u5b9f\u884c\u3002\u304a\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5909\u308f\u308a\u307e\u3057\u305f\u3002\u300c<code>NameError: name 'MyWatch' is not defined<\/code>\u300d\u3068\u4e3b\u5f35\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u304c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u5316\u3057\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u306f\u56de\u907f\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5909\u308f\u3063\u305f\u306e\u3067\u3001\u4e00\u6b69\u524d\u9032\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">TypeError: 'module' object is not callable<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3048\u3048\u3068\u3001\u3069\u3046\u3057\u3066\u3067\u3057\u3087\u3046\u306d\u3047\u3002\u3002\u3002\u305d\u3046\u305d\u3046\u3001\u308f\u304b\u308a\u307e\u3057\u305f\u3002import \u306e\u66f8\u304d\u65b9\u304c\u9055\u3044\u307e\u3057\u305f\u3002\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from MyWatch import MyWatch<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u306f\u3044\u3001\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002\u30e2\u30b8\u30e5\u30fc\u30eb\u540d\u3068\u30af\u30e9\u30b9\u540d\u304c\u540c\u3058\u3060\u3068\u3001\u610f\u5473\u304c\u308f\u304b\u308a\u305a\u3089\u3044\u3067\u3059\u306d\u3002\u6b21\u56de\u304b\u3089\u306f\u6c17\u3092\u4ed8\u3051\u307e\u3057\u3087\u3046\u3002\u305d\u3046\u3044\u3048\u3070\u3001Python\u306b\u306f\u304a\u3059\u3059\u3081\u306e\u547d\u540d\u898f\u5247\u304c\u3042\u3063\u305f\u3088\u3046\u306a\u3002\u3002\u3002\u8abf\u3079\u305f\u3089\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u540d\u306f\u3001snake_case\u30b9\u30bf\u30a4\u30eb\u306b\u6e96\u62e0\u3059\u308b\u306e\u304c\u671b\u307e\u3057\u3044\u305d\u3046\u3067\u3059\u3002\u307e\u3001\u4eca\u65e5\u306e\u3068\u3053\u308d\u306f\u3001\u3053\u308c\u3067\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">EReloaded modules: MyWatch\n\n======================================================================\nERROR: test_time (__main__.MyWatchTest)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"C:\/work\/tkinter_example\/mywatchtest.py\", line 16, in test_time\n    self.assertEqual(self.mywatch.time() == \"12:05:20\")\nAttributeError: 'MyWatch' object has no attribute 'time'\n\n----------------------------------------------------------------------\nRan 1 test in 0.002s\n\nFAILED (errors=1)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3061\u3087\u3063\u3068\u9032\u307f\u307e\u3057\u305f\u3002\u3084\u3063\u3068\u3001<code>time<\/code>\u3068\u3044\u3046\u5c5e\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3001\u3068\u3044\u3046\u3068\u3053\u308d\u307e\u3067\u305f\u3069\u308a\u7740\u304d\u307e\u3057\u305f\u3002\u3067\u306f\u3001<code>time<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3053\u308c\u3001\u6700\u901f\u3067\u30c6\u30b9\u30c8\u3092\u901a\u3059\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    def time(self):\n        return \"12:05:20\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002\u304a\u304a\u3001AttributeError\u306e\u3068\u3053\u308d\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">TypeError: assertEqual() missing 1 required positional argument: 'second'<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u304a\u6065\u305a\u304b\u3057\u3044\u3001<code>assertEqual()<\/code>\u306e\u4f7f\u3044\u65b9\u3092\u9593\u9055\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        self.assertEqual(self.mywatch.time(), \"12:05:20\", \"time()\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3053\u308c\u3067\u3001\u3069\u3046\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> \u3000\u306f\u3044\u3001\u6210\u529f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">.Reloaded modules: MyWatch\n\n----------------------------------------------------------------------\nRan 1 test in 0.001s\n\nOK<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3053\u308c\u3067\u3001\u3084\u3063\u30681\u30b5\u30a4\u30af\u30eb\u3067\u304d\u307e\u3057\u305f\u3002\u307e\u3001\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3001\u3057\u3066\u307e\u305b\u3093\u3051\u3069\u306d\u3002\u6b21\u306f\u3001\u3061\u3083\u3093\u3068\u6642\u523b\u3092\u8fd4\u3059\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<code>datetime<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3001<code>return<\/code>\u6587\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        return datetime.strftime(datetime.now(),\"%H:%M:%S\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3053\u308c\u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">FReloaded modules: MyWatch\n\n======================================================================\nFAIL: test_time (__main__.MyWatchTest)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"C:\/work\/tkinter_example\/mywatchtest.py\", line 16, in test_time\n    self.assertEqual(self.mywatch.time(), \"12:05:20\", \"time()\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002\")\nAssertionError: '20:16:16' != '12:05:20'\n- 20:16:16\n+ 12:05:20\n : time()\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002\n\n----------------------------------------------------------------------\nRan 1 test in 0.002s\n\nFAILED (failures=1)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u306f\u3044\u3001\u5b9f\u88c5\u3067\u304d\u307e\u3057\u305f\u304c\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30c6\u30b9\u30c8\u3092\u901a\u3059\u305f\u3081\u306b\u306f\u3001<code>datetime.now()<\/code>\u306e\u623b\u308a\u5024\u304c\u300c12:05:20\u300d\u306b\u306a\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3046\u3044\u3046\u3068\u304d\u306b\u3001Mock\u304c\u5f79\u306b\u7acb\u3061\u307e\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305a\u306f\u3001<code>from unittest.mock import Mock<\/code>\u3068\u3001<code>Mock<\/code>\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3001<code>test_time()<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    def test_time(self):\n        original_time = self.mywatch.time\n        self.mywatch.time = Mock(return_value=\"12:05:20\")\n        self.assertEqual(self.mywatch.time(), \"12:05:20\", \"time()\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002\")\n        self.mywatch.time = original_time<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u5b9f\u884c\u3059\u308b\u3068\u3001\u6210\u529f\u3067\u3059\u3002\u3053\u306e\u3088\u3046\u306b<code>Mock<\/code>\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u4ed6\u3078\u306e\u5f71\u97ff\u306a\u304f<code>time()<\/code>\u306e\u3075\u308b\u307e\u3044\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u305f\u3060\u3001\u6bce\u56de\u3053\u306e\u3088\u3046\u306b\u5143\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u306e\u306f\u304b\u306a\u308a\u60a9\u307e\u3057\u3044\u554f\u984c\u3067\u3059\u3088\u306d\u3002\u3088\u308a\u7c21\u6f54\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3068\u3057\u3066\u3001<code>patch<\/code>\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u306e\u5f62\u5f0f\u3060\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    def test_time(self):\n        with patch('MyWatch.datetime') as faketime:\n            faketime.now.return_value = datetime.datetime(2020,5,8,12,5,20)\n            faketime.strftime.side_effect = datetime.datetime.strftime\n            self.assertEqual(self.mywatch.time(), \"12:05:20\", \"time()\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u307e\u305f\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u5f62\u5f0f\u3067\u8a18\u8ff0\u3059\u308b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    @patch('MyWatch.datetime')\n    def test_time(self, faketime):\n        faketime.now.return_value = datetime.datetime(2020,5,8,12,5,20)\n        faketime.strftime.side_effect = datetime.datetime.strftime\n        self.assertEqual(self.mywatch.time(), \"12:05:20\", \"time()\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\u3002\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000\u3069\u308c\u3082\u5927\u3057\u3066\u5909\u308f\u308a\u307e\u305b\u3093\u306d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3000unittest.Mock\u3092\u4f7f\u3063\u3066\u3001\u30c6\u30b9\u30c8\u6642\u306e\u3075\u308b\u307e\u3044\u306b\u5909\u66f4\u3092\u52a0\u3048\u3066\u307f\u307e\u3057\u305f\u3002Mock\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3068\u3001\u51fa\u6765\u4e0a\u304c\u3063\u3066\u3044\u306a\u3044\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u3053\u3061\u3089\u306e\u60f3\u5b9a\u306e\u4e0b\u306b\u81ea\u5206\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30c6\u30b9\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u306a\u3069\u3001\u4ed5\u4e8b\u306e\u5e45\u304c\u5e83\u304c\u308a\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u4eca\u65e5\u3082\u898b\u306b\u6765\u3066\u304f\u3060\u3055\u3063\u3066\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u77f3\u5ddd\u3055\u3093\u3067\u3059\u3002 \u3000\u524d\u56de\u3001unittest\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u6982\u8981\u3092\u304a\u4f1d\u3048\u3057\u305f\u306e\u3067\u3059\u304c\u3001Mock\u306b\u3064\u3044\u3066\u304a\u4f1d\u3048\u3057\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002Mock\u306f\u3001\u30e2\u30c3\u30af\u3068\u304b\u30b9\u30bf\u30d6\u3068\u304b\u30d1\u30c3\u30c1\u3068\u304b\u3001\u3044\u308f\u3086 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,2],"tags":[],"class_list":["post-1237","post","type-post","status-publish","format-standard","hentry","category-program","category-blog"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"sTone\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01 | \u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u7dd2\u306b\u6975\u3081\u307e\u3057\u3087\u3046\uff01\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8ad6\u7406\u8a2d\u8a08\uff08\u696d\u52d9\u5206\u6790\uff09\u304c\u8da3\u5473\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306e\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u3067\u3059\u3002\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3082\u5f97\u610f\u3067\u3059\u3002\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3051\u308b\u69d8\u3005\u306a\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3089\u3092\u5171\u6709\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82 | \u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/cropped-ishikawasekkei-2.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/cropped-ishikawasekkei-2.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-08T15:00:50+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-05-08T15:17:23+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82 | \u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/cropped-ishikawasekkei-2.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#article\",\"name\":\"Python\\u30d7\\u30ed\\u30b0\\u30e9\\u30df\\u30f3\\u30b0 \\u61a7\\u308c\\u306e\\u30c6\\u30b9\\u30c8\\u30d5\\u30a1\\u30fc\\u30b9\\u30c82 | \\u682a\\u5f0f\\u4f1a\\u793e \\u77f3\\u5ddd\\u8a2d\\u8a08 \\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\\u3092\\u3068\\u3053\\u3068\\u3093\\u6975\\u3081\\u307e\\u3059\\uff01\",\"headline\":\"Python\\u30d7\\u30ed\\u30b0\\u30e9\\u30df\\u30f3\\u30b0 \\u61a7\\u308c\\u306e\\u30c6\\u30b9\\u30c8\\u30d5\\u30a1\\u30fc\\u30b9\\u30c82\",\"author\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/ishikawasekkei.png\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/#articleImage\",\"width\":1000,\"height\":1000},\"datePublished\":\"2020-05-09T00:00:50+09:00\",\"dateModified\":\"2020-05-09T00:17:23+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#webpage\"},\"articleSection\":\"Program, \\u30d6\\u30ed\\u30b0\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.ishikawasekkei.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/category\\\/blog\\\/#listItem\",\"name\":\"\\u30d6\\u30ed\\u30b0\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/category\\\/blog\\\/#listItem\",\"position\":2,\"name\":\"\\u30d6\\u30ed\\u30b0\",\"item\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/category\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#listItem\",\"name\":\"Python\\u30d7\\u30ed\\u30b0\\u30e9\\u30df\\u30f3\\u30b0 \\u61a7\\u308c\\u306e\\u30c6\\u30b9\\u30c8\\u30d5\\u30a1\\u30fc\\u30b9\\u30c82\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#listItem\",\"position\":3,\"name\":\"Python\\u30d7\\u30ed\\u30b0\\u30e9\\u30df\\u30f3\\u30b0 \\u61a7\\u308c\\u306e\\u30c6\\u30b9\\u30c8\\u30d5\\u30a1\\u30fc\\u30b9\\u30c82\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/category\\\/blog\\\/#listItem\",\"name\":\"\\u30d6\\u30ed\\u30b0\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/#organization\",\"name\":\"\\u682a\\u5f0f\\u4f1a\\u793e \\u77f3\\u5ddd\\u8a2d\\u8a08\",\"description\":\"\\u3068\\u3044\\u3046\\u3053\\u3068\\u3067\\u4e00\\u7dd2\\u306b\\u6975\\u3081\\u307e\\u3057\\u3087\\u3046\\uff01\\u30c7\\u30fc\\u30bf\\u30d9\\u30fc\\u30b9\\u8ad6\\u7406\\u8a2d\\u8a08\\uff08\\u696d\\u52d9\\u5206\\u6790\\uff09\\u304c\\u8da3\\u5473\\u306e\\u3088\\u3046\\u306b\\u306a\\u3063\\u3066\\u3057\\u307e\\u3063\\u305f\\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\\u306e\\u30b9\\u30da\\u30b7\\u30e3\\u30ea\\u30b9\\u30c8\\u3067\\u3059\\u3002\\u30d1\\u30d5\\u30a9\\u30fc\\u30de\\u30f3\\u30b9\\u30c1\\u30e5\\u30fc\\u30cb\\u30f3\\u30b0\\u3082\\u5f97\\u610f\\u3067\\u3059\\u3002\\u30b7\\u30b9\\u30c6\\u30e0\\u306b\\u304a\\u3051\\u308b\\u69d8\\u3005\\u306a\\u554f\\u984c\\u3092\\u89e3\\u6c7a\\u3057\\u3066\\u3044\\u307e\\u3059\\u306e\\u3067\\u3001\\u305d\\u308c\\u3089\\u3092\\u5171\\u6709\\u3067\\u304d\\u308c\\u3070\\u3068\\u601d\\u3044\\u307e\\u3059\\u3002\",\"url\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/ishikawasekkei.png\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#organizationLogo\",\"width\":1000,\"height\":1000},\"image\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/author\\\/admin\\\/\",\"name\":\"sTone\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2f57b28952073aaca504b61d7b66d58e91b0b7847aabadc207080755d0f507ea?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"sTone\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#webpage\",\"url\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/\",\"name\":\"Python\\u30d7\\u30ed\\u30b0\\u30e9\\u30df\\u30f3\\u30b0 \\u61a7\\u308c\\u306e\\u30c6\\u30b9\\u30c8\\u30d5\\u30a1\\u30fc\\u30b9\\u30c82 | \\u682a\\u5f0f\\u4f1a\\u793e \\u77f3\\u5ddd\\u8a2d\\u8a08 \\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\\u3092\\u3068\\u3053\\u3068\\u3093\\u6975\\u3081\\u307e\\u3059\\uff01\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/2020\\\/05\\\/09\\\/python-programing-test-first2\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/index.php\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2020-05-09T00:00:50+09:00\",\"dateModified\":\"2020-05-09T00:17:23+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/#website\",\"url\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/\",\"name\":\"\\u682a\\u5f0f\\u4f1a\\u793e \\u77f3\\u5ddd\\u8a2d\\u8a08 \\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\\u3092\\u3068\\u3053\\u3068\\u3093\\u6975\\u3081\\u307e\\u3059\\uff01\",\"description\":\"\\u3068\\u3044\\u3046\\u3053\\u3068\\u3067\\u4e00\\u7dd2\\u306b\\u6975\\u3081\\u307e\\u3057\\u3087\\u3046\\uff01\\u30c7\\u30fc\\u30bf\\u30d9\\u30fc\\u30b9\\u8ad6\\u7406\\u8a2d\\u8a08\\uff08\\u696d\\u52d9\\u5206\\u6790\\uff09\\u304c\\u8da3\\u5473\\u306e\\u3088\\u3046\\u306b\\u306a\\u3063\\u3066\\u3057\\u307e\\u3063\\u305f\\u30b7\\u30b9\\u30c6\\u30e0\\u958b\\u767a\\u306e\\u30b9\\u30da\\u30b7\\u30e3\\u30ea\\u30b9\\u30c8\\u3067\\u3059\\u3002\\u30d1\\u30d5\\u30a9\\u30fc\\u30de\\u30f3\\u30b9\\u30c1\\u30e5\\u30fc\\u30cb\\u30f3\\u30b0\\u3082\\u5f97\\u610f\\u3067\\u3059\\u3002\\u30b7\\u30b9\\u30c6\\u30e0\\u306b\\u304a\\u3051\\u308b\\u69d8\\u3005\\u306a\\u554f\\u984c\\u3092\\u89e3\\u6c7a\\u3057\\u3066\\u3044\\u307e\\u3059\\u306e\\u3067\\u3001\\u305d\\u308c\\u3089\\u3092\\u5171\\u6709\\u3067\\u304d\\u308c\\u3070\\u3068\\u601d\\u3044\\u307e\\u3059\\u3002\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.ishikawasekkei.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82 | \u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01","description":"","canonical_url":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#article","name":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82 | \u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01","headline":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82","author":{"@id":"https:\/\/www.ishikawasekkei.com\/index.php\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.ishikawasekkei.com\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/ishikawasekkei.png","@id":"https:\/\/www.ishikawasekkei.com\/#articleImage","width":1000,"height":1000},"datePublished":"2020-05-09T00:00:50+09:00","dateModified":"2020-05-09T00:17:23+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#webpage"},"isPartOf":{"@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#webpage"},"articleSection":"Program, \u30d6\u30ed\u30b0"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.ishikawasekkei.com#listItem","position":1,"name":"Home","item":"https:\/\/www.ishikawasekkei.com","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/category\/blog\/#listItem","name":"\u30d6\u30ed\u30b0"}},{"@type":"ListItem","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/category\/blog\/#listItem","position":2,"name":"\u30d6\u30ed\u30b0","item":"https:\/\/www.ishikawasekkei.com\/index.php\/category\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#listItem","name":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ishikawasekkei.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#listItem","position":3,"name":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82","previousItem":{"@type":"ListItem","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/category\/blog\/#listItem","name":"\u30d6\u30ed\u30b0"}}]},{"@type":"Organization","@id":"https:\/\/www.ishikawasekkei.com\/#organization","name":"\u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08","description":"\u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u7dd2\u306b\u6975\u3081\u307e\u3057\u3087\u3046\uff01\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8ad6\u7406\u8a2d\u8a08\uff08\u696d\u52d9\u5206\u6790\uff09\u304c\u8da3\u5473\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306e\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u3067\u3059\u3002\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3082\u5f97\u610f\u3067\u3059\u3002\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3051\u308b\u69d8\u3005\u306a\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3089\u3092\u5171\u6709\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002","url":"https:\/\/www.ishikawasekkei.com\/","logo":{"@type":"ImageObject","url":"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/ishikawasekkei.png","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#organizationLogo","width":1000,"height":1000},"image":{"@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/author\/admin\/#author","url":"https:\/\/www.ishikawasekkei.com\/index.php\/author\/admin\/","name":"sTone","image":{"@type":"ImageObject","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2f57b28952073aaca504b61d7b66d58e91b0b7847aabadc207080755d0f507ea?s=96&d=mm&r=g","width":96,"height":96,"caption":"sTone"}},{"@type":"WebPage","@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#webpage","url":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/","name":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82 | \u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01","inLanguage":"ja","isPartOf":{"@id":"https:\/\/www.ishikawasekkei.com\/#website"},"breadcrumb":{"@id":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/#breadcrumblist"},"author":{"@id":"https:\/\/www.ishikawasekkei.com\/index.php\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.ishikawasekkei.com\/index.php\/author\/admin\/#author"},"datePublished":"2020-05-09T00:00:50+09:00","dateModified":"2020-05-09T00:17:23+09:00"},{"@type":"WebSite","@id":"https:\/\/www.ishikawasekkei.com\/#website","url":"https:\/\/www.ishikawasekkei.com\/","name":"\u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01","description":"\u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u7dd2\u306b\u6975\u3081\u307e\u3057\u3087\u3046\uff01\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8ad6\u7406\u8a2d\u8a08\uff08\u696d\u52d9\u5206\u6790\uff09\u304c\u8da3\u5473\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306e\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u3067\u3059\u3002\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3082\u5f97\u610f\u3067\u3059\u3002\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3051\u308b\u69d8\u3005\u306a\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3089\u3092\u5171\u6709\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002","inLanguage":"ja","publisher":{"@id":"https:\/\/www.ishikawasekkei.com\/#organization"}}]},"og:locale":"ja_JP","og:site_name":"\u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01 | \u3068\u3044\u3046\u3053\u3068\u3067\u4e00\u7dd2\u306b\u6975\u3081\u307e\u3057\u3087\u3046\uff01\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u8ad6\u7406\u8a2d\u8a08\uff08\u696d\u52d9\u5206\u6790\uff09\u304c\u8da3\u5473\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u306e\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u3067\u3059\u3002\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3082\u5f97\u610f\u3067\u3059\u3002\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3051\u308b\u69d8\u3005\u306a\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3089\u3092\u5171\u6709\u3067\u304d\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002","og:type":"article","og:title":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82 | \u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01","og:url":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/","og:image":"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/cropped-ishikawasekkei-2.png","og:image:secure_url":"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/cropped-ishikawasekkei-2.png","article:published_time":"2020-05-08T15:00:50+00:00","article:modified_time":"2020-05-08T15:17:23+00:00","twitter:card":"summary","twitter:title":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82 | \u682a\u5f0f\u4f1a\u793e \u77f3\u5ddd\u8a2d\u8a08 \u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3092\u3068\u3053\u3068\u3093\u6975\u3081\u307e\u3059\uff01","twitter:image":"https:\/\/www.ishikawasekkei.com\/wp-content\/uploads\/2019\/02\/cropped-ishikawasekkei-2.png"},"aioseo_meta_data":{"post_id":"1237","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 03:58:14","updated":"2025-07-16 15:37:32","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ishikawasekkei.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ishikawasekkei.com\/index.php\/category\/blog\/\" title=\"\u30d6\u30ed\u30b0\">\u30d6\u30ed\u30b0<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPython\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.ishikawasekkei.com"},{"label":"\u30d6\u30ed\u30b0","link":"https:\/\/www.ishikawasekkei.com\/index.php\/category\/blog\/"},{"label":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u61a7\u308c\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c82","link":"https:\/\/www.ishikawasekkei.com\/index.php\/2020\/05\/09\/python-programing-test-first2\/"}],"_links":{"self":[{"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/posts\/1237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/comments?post=1237"}],"version-history":[{"count":7,"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/posts\/1237\/revisions"}],"predecessor-version":[{"id":1246,"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/posts\/1237\/revisions\/1246"}],"wp:attachment":[{"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/media?parent=1237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/categories?post=1237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ishikawasekkei.com\/index.php\/wp-json\/wp\/v2\/tags?post=1237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}