{"id":225,"date":"2020-03-13T21:06:26","date_gmt":"2020-03-13T12:06:26","guid":{"rendered":"http:\/\/batmask.dothome.co.kr\/?p=225"},"modified":"2025-09-09T09:12:03","modified_gmt":"2025-09-09T00:12:03","slug":"python-unit-test-01","status":"publish","type":"post","link":"http:\/\/batmask.net\/index.php\/2020\/03\/13\/225\/","title":{"rendered":"Python Unit test #01"},"content":{"rendered":"\n<p>\uc694\uc998 \ub108\ubb34 \uc624\ub7ab\ub9cc\uc5d0 \ucf54\ub529\uc744 \ud558\ub2e4\ubcf4\ub2c8, unit test\ub3c4 \ub2e4 \uae4c\uba39\uace0 kotlin\uc5d0\uc11c\ub294 \uc5b4\ub5bb\uac8c \ud574\uc57c\ud560\uc9c0 \ub9c9\ub9c9\ud588\ub2e4. unit test\ub97c \ub2e4\ub8e8\ub294\ub370\uc5d0\ub294 \uc544\ubb34\ub798\ub3c4 python\uc774 \ud3b8\ud558\uace0 \uc26c\uc6b4\uac70 \uac19\uc544\uc11c \uc77c\ub2e8 python\uc5d0\uc11c\uc758 unit test\ub97c \ubcf4\ub294\uc911. \uc544\uc9c1 \ubcfc\uac8c \ub9ce\uc740\ub370, \ud55c\ubc88\uc5d0 \ub2e4 \uae30\ub85d\ud558\ub824\uba74 \ub9ce\uc73c\ub2c8\uae4c \uc77c\ub2e8 \uae30\ubcf8\uc801\uc778\uac70\ub9cc \uae30\ub85d\ud574\ubcf8\ub2e4.<\/p>\n\n\n\n<p>\uc8fc\ub85c \ucc38\uace0\ud55c \uacf3\uc740 \uc720\ud2ad\uc5d0\uc11c \uc544\ub798\uc5d0 \ubcf4\uc774\ub294 <a href=\"https:\/\/www.youtube.com\/watch?v=6tNS--WetLI\">Python Tutorial: Unit Testing Your Code with the unittest Module<\/a> \uc694 \uc601\uc0c1\uc774\ub2e4. \uc720\ud2ad\uc5d0 \ud559\uc2b5\uc6a9 \uc601\uc0c1\ub4e4 \ud2b8\ub798\uc26c \uac08\ube44\uc9c0 \uc4f0\ub808\uae30\uac00 \ub9ce\uc740\ub370, \uc774\ubd84 \ucc44\ub110 \uc790\uccb4\uac00 python \uc785\ubb38\uc790\uc5d0\uac90 \ubcf4\uc11d\uac19\uc740 \uc874\uc7ac. \ud604\uc7ac\uc758 \ub0b4\uac8c <a href=\"https:\/\/realpython.com\/\">real python(\uc720\ub8cc)<\/a>\uc640 \uc774\ubd84\uc758 \ucc44\ub110\uc774 \uac00\uc7a5 \ub3c4\uc6c0\uc774 \ub418\uace0 \uc788\ub2e4. <a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html\">\uacf5\uc2dd \ubb38\uc11c\uc758 \ub808\ud37c\ub7f0\uc2a4<\/a>\uc57c \ub2f9\uc5f0\ud788 \ucc38\uace0.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Python Tutorial: Unit Testing Your Code with the unittest Module\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/6tNS--WetLI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p> \ub2e4\uc74c\uacfc \uac19\uc774 \uc6d0\ud654\uc640 \ub2ec\ub7ec\uc758 \ud658\uc728\uc744 \uacc4\uc0b0\ud574\uc8fc\ub294 \uc544\uc8fc \uac04\ub2e8\ud55c \ubcc0\ud658\uae30\ub97c \ud14c\uc2a4\ud2b8\ud55c\ub2e4\uace0 \ud574\ubcf4\uc790.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class CurrencyConverter:\n    def __init__(self):\n        self.currency = 0.00083\n\n    def won_to_dollar(self, won):\n        return won * self.currency\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">CurrencyConverter<\/span><span style=\"color: #ADBAC7\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #6CB6FF\">__init__<\/span><span style=\"color: #ADBAC7\">(self):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #6CB6FF\">self<\/span><span style=\"color: #ADBAC7\">.currency <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #6CB6FF\">0.00083<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">won_to_dollar<\/span><span style=\"color: #ADBAC7\">(self, won):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">return<\/span><span style=\"color: #ADBAC7\"> won <\/span><span style=\"color: #F47067\">*<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #6CB6FF\">self<\/span><span style=\"color: #ADBAC7\">.currency<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Python\uc5d0\uc11c\ub3c4 unit test\ub97c \uc704\ud55c \ud328\ud0a4\uc9c0\ub294 \uc5ec\ub7ec\uac00\uc9c0\uac00 \uc788\ub294\ub370, \uac00\uc7a5 \uae30\ubcf8\uc801\uc778\uac74 &#8216;unittest&#8217;\uc778\ub4ef\ud558\ub2e4. \uae30\ubcf8\uc801\uc778 \ud14c\uc2a4\ud2b8 \ucf00\uc774\uc2a4\ub97c \ub9cc\ub4e4\uae30 \uc704\ud574 &#8216;TestCase&#8217;\ub3c4 import\ud574\uc900\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>import unittest\nfrom unittest import TestCase<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">import<\/span><span style=\"color: #ADBAC7\"> unittest<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">from<\/span><span style=\"color: #ADBAC7\"> unittest <\/span><span style=\"color: #F47067\">import<\/span><span style=\"color: #ADBAC7\"> TestCase<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p> \ud14c\uc2a4\ud2b8\ub97c \ud558\ub824\uba74 \uadf8 \ub300\uc0c1\uc778 &#8216;CurrencyConverter&#8217;\ub294 \ub2f9\uc5f0\ud788 \uc784\ud3ec\ud2b8 \ud574\uc57c\ud55c\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>from currency_converter import CurrencyConverter<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">from<\/span><span style=\"color: #ADBAC7\"> currency_converter <\/span><span style=\"color: #F47067\">import<\/span><span style=\"color: #ADBAC7\"> CurrencyConverter<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p> \ud14c\uc2a4\ud2b8 \ucf00\uc774\uc2a4\ub97c \ub9cc\ub4e4\ub824\uba74 &#8216;TestCase&#8217;\ub97c \uc0c1\uc18d\ubc1b\uc544 \ud074\ub798\uc2a4\ub97c \ub9cc\ub4e4\uc5b4\uc57c \ud55c\ub2e4. \uac01\uac01\uc758 \ud14c\uc2a4\ud2b8\ub4e4\uc740 \uc774 \ud074\ub798\uc2a4\uc548\uc5d0 \uc811\ub450\uc5b4 &#8216;test_&#8217;\ub97c \ubd99\uc5ec\uc11c \uba64\ubc84\ud568\uc218\ub85c \ub9cc\ub4e4\uc5b4\uc900\ub2e4.  &#8216;test_&#8217;\ub4a4\uc5d0 \ub098\uc624\ub294 \uc774\ub984\uc740 \uc0c1\uad00\uc5c6\ub294\ub370, \uc544\ub798 \ucf54\ub4dc\ub294 won_to_dollar() \ud568\uc218\ub97c \ud14c\uc2a4\ud2b8\ud558\ub824\uace0 \uc774\ub984\uc744 \ubd99\uc5ec\uc92c\ub2e4. <\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class TestCurrencyConverter(TestCase):\n    def test_w_to_d(self):\n        pass<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">TestCurrencyConverter<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #6CB6FF\">TestCase<\/span><span style=\"color: #ADBAC7\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">test_w_to_d<\/span><span style=\"color: #ADBAC7\">(self):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">pass<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\uc774\uc81c \ud14c\uc2a4\ud2b8\ub97c \ud574\uc57c\ud558\ub294\ub370, TestCase\uc5d0 \uc815\uc758\ub41c aseert\ubb38\ub4e4\uc744 \uc0ac\uc6a9\ud55c\ub2e4. <a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html\">\uacf5\uc2dd\ubb38\uc11c\ub97c \ucc38\uace0<\/a>\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \uac83\ub4e4\uc774 \uc788\ub2e4. <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Method<\/th><th>Checks that<\/th><th>New in<\/th><\/tr><\/thead><tbody><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertEqual\"><code>assertEqual(a,&nbsp;b)<\/code><\/a><\/td><td><code>a&nbsp;==&nbsp;b<\/code><\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertNotEqual\"><code>assertNotEqual(a,&nbsp;b)<\/code><\/a><\/td><td><code>a&nbsp;!=&nbsp;b<\/code><\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertTrue\"><code>assertTrue(x)<\/code><\/a><\/td><td><code>bool(x)&nbsp;is&nbsp;True<\/code><\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertFalse\"><code>assertFalse(x)<\/code><\/a><\/td><td><code>bool(x)&nbsp;is&nbsp;False<\/code><\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertIs\"><code>assertIs(a,&nbsp;b)<\/code><\/a><\/td><td><code>a&nbsp;is&nbsp;b<\/code><\/td><td>3.1<\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertIsNot\"><code>assertIsNot(a,&nbsp;b)<\/code><\/a><\/td><td><code>a&nbsp;is&nbsp;not&nbsp;b<\/code><\/td><td>3.1<\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertIsNone\"><code>assertIsNone(x)<\/code><\/a><\/td><td><code>x&nbsp;is&nbsp;None<\/code><\/td><td>3.1<\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertIsNotNone\"><code>assertIsNotNone(x)<\/code><\/a><\/td><td><code>x&nbsp;is&nbsp;not&nbsp;None<\/code><\/td><td>3.1<\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertIn\"><code>assertIn(a,&nbsp;b)<\/code><\/a><\/td><td><code>a&nbsp;in&nbsp;b<\/code><\/td><td>3.1<\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertNotIn\"><code>assertNotIn(a,&nbsp;b)<\/code><\/a><\/td><td><code>a&nbsp;not&nbsp;in&nbsp;b<\/code><\/td><td>3.1<\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertIsInstance\"><code>assertIsInstance(a,&nbsp;b)<\/code><\/a><\/td><td><code>isinstance(a,&nbsp;b)<\/code><\/td><td>3.2<\/td><\/tr><tr><td><a href=\"https:\/\/docs.python.org\/3\/library\/unittest.html#unittest.TestCase.assertNotIsInstance\"><code>assertNotIsInstance(a,&nbsp;b)<\/code><\/a><\/td><td><code>not&nbsp;isinstance(a,&nbsp;b)<\/code><\/td><td>3.2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\ud658\uc728\uc758 \ucd08\uae30\uac12\uc774 0.00083\uc774\ubbc0\ub85c, \ub9cc\uc57d \uac04\ub2e8\ud558\uac8c \ucc9c\uc6d0\uc744 \ubcc0\ud658\ud558\uba74 0.83 \ub2ec\ub7ec\uac00 \ub420 \uac83\uc774\ub2e4. \uc694\uac78 \ud14c\uc2a4\ud2b8 \ucf00\uc774\uc2a4\ub85c \ub9cc\ub4e4\uba74 \ub2e4\uc74c\uacfc \uac19\uc774 \ub41c\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class TestCurrencyConverter(TestCase):\n    def test_won_to_dollar(self):\n        cc = CurrencyConverter()\n        self.assertEqual(cc.won_to_dollar(1000), 0.83)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">TestCurrencyConverter<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #6CB6FF\">TestCase<\/span><span style=\"color: #ADBAC7\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">test_won_to_dollar<\/span><span style=\"color: #ADBAC7\">(self):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        cc <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> CurrencyConverter()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #6CB6FF\">self<\/span><span style=\"color: #ADBAC7\">.assertEqual(cc.won_to_dollar(<\/span><span style=\"color: #6CB6FF\">1000<\/span><span style=\"color: #ADBAC7\">), <\/span><span style=\"color: #6CB6FF\">0.83<\/span><span style=\"color: #ADBAC7\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ub2e4\uc74c\uacfc \uac19\uc740 \uba85\ub839\ud589\uc73c\ub85c \ud14c\uc2a4\ud2b8\ub97c \uc2e4\ud589\ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>>python -m unittest tests\\test_currency_converter.py<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">&gt;<\/span><span style=\"color: #ADBAC7\">python <\/span><span style=\"color: #F47067\">-<\/span><span style=\"color: #ADBAC7\">m unittest tests\\<\/span><span style=\"color: #FF938A; font-style: italic\">test_currency_converter.py<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ud14c\uc2a4\ud2b8 \ud558\uae30\uc804\uc5d0, \ud2b9\uc815 \uac12\uc744 \uc124\uc815\ud558\ub294\ub4f1 \ucd08\uae30\ud654 \uc791\uc5c5\uc774 \ud544\uc694\ud558\uba74,  &#8216;setUp()&#8217;\uc744 \uc0ac\uc6a9\ud558\uace0 \ud14c\uc2a4\ud2b8\uac00 \ub05d\ub098\uace0 \ubcc0\uacbd\ub41c \uac12\uc744 \ub3cc\ub824\ub193\uac70\ub098 \ub9ac\uc18c\uc2a4\ub97c \ud574\uc81c\ud558\ub824\uba74 tearDown()\uc744 \uc4f4\ub2e4. \uc774\ub4e4\uc740 \uac01 \ud14c\uc2a4\ud2b8 \uba54\uc18c\ub4dc\uac00 \uc2e4\ud589\ub420 \ub54c\ub9c8\ub2e4 setUp()-test_method1()-tearDown()-setUp()-test_method2()-tearDown()&#8230;\uacfc \uac19\uc774 \ud638\ucd9c\ub41c\ub2e4. \uc774\ub97c \uc55e\uc758 \ud14c\uc2a4\ud2b8 \ud074\ub798\uc2a4\uc5d0 \uc801\uc6a9\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class TestCurrencyConverter(TestCase):\n    \n    def setUp(self) -> None:\n        self.cc = CurrencyConverter() # \uac1d\uccb4\uc0dd\uc131\ubd80\ubd84\uc774 \uc5ec\uae30\ub85c \uc62e\uaca8\uc654\ub2e4.\n        \n    def tearDown(self) -> None:\n        pass\n    \n    def test_won_to_dollar(self):\n        self.assertEqual(self.cc.won_to_dollar(1000), 0.83)\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">TestCurrencyConverter<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #6CB6FF\">TestCase<\/span><span style=\"color: #ADBAC7\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">setUp<\/span><span style=\"color: #ADBAC7\">(self) -&gt; <\/span><span style=\"color: #6CB6FF\">None<\/span><span style=\"color: #ADBAC7\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #6CB6FF\">self<\/span><span style=\"color: #ADBAC7\">.cc <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> CurrencyConverter() <\/span><span style=\"color: #768390\"># \uac1d\uccb4\uc0dd\uc131\ubd80\ubd84\uc774 \uc5ec\uae30\ub85c \uc62e\uaca8\uc654\ub2e4.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">tearDown<\/span><span style=\"color: #ADBAC7\">(self) -&gt; <\/span><span style=\"color: #6CB6FF\">None<\/span><span style=\"color: #ADBAC7\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">pass<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">test_won_to_dollar<\/span><span style=\"color: #ADBAC7\">(self):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #6CB6FF\">self<\/span><span style=\"color: #ADBAC7\">.assertEqual(<\/span><span style=\"color: #6CB6FF\">self<\/span><span style=\"color: #ADBAC7\">.cc.won_to_dollar(<\/span><span style=\"color: #6CB6FF\">1000<\/span><span style=\"color: #ADBAC7\">), <\/span><span style=\"color: #6CB6FF\">0.83<\/span><span style=\"color: #ADBAC7\">)<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ub9cc\uc57d, \ud14c\uc2a4\ud2b8 \ud074\ub798\uc2a4 \uc804\uccb4\uc5d0\uc11c \uc5ec\ub7ec\ud14c\uc2a4\ud2b8\ub97c \ud558\ub294\ub3d9\uc548  \ud55c\ubc88\uc529\ub9cc \ud638\ucd9c\ub418\uac8c \ud558\ub824\uba74 setUpClass(cls), tearDownClass(cls)\ub97c \ud074\ub798\uc2a4 \uba54\uc18c\ub4dc\ub85c \uc815\uc758\ud55c\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>...\n    @classmethod\n    def setUpClass(cls) -> None:\n        pass\n\n    @classmethod\n    def tearDownClass(cls) -> None:\n        pass\n...<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6CB6FF\">...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #DCBDFB\">@<\/span><span style=\"color: #6CB6FF\">classmethod<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">setUpClass<\/span><span style=\"color: #ADBAC7\">(cls) -&gt; <\/span><span style=\"color: #6CB6FF\">None<\/span><span style=\"color: #ADBAC7\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">pass<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #DCBDFB\">@<\/span><span style=\"color: #6CB6FF\">classmethod<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">def<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">tearDownClass<\/span><span style=\"color: #ADBAC7\">(cls) -&gt; <\/span><span style=\"color: #6CB6FF\">None<\/span><span style=\"color: #ADBAC7\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">pass<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6CB6FF\">...<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>pyCharm\uc5d0\uc11c\ub294 \ud14c\uc2a4\ud2b8 \ub300\uc0c1 \ud074\ub798\uc2a4\uc5d0\uc11c Ctrl+Shift+T \ub97c \ub204\ub974\uba74 \uc6d0\ud558\ub294 \ud14c\uc2a4\ud2b8 \ud074\ub798\uc2a4\ub97c \uc790\ub3d9\uc73c\ub85c \uc0dd\uc131\ud574\uc900\ub2e4. \uc774\ub807\uac8c \uc0dd\uc131\ub418\uba74Ctrl+Shift+F10\uc73c\ub85c \uc2e4\ud589\ud588\uc744 \ub54c, \uc790\ub3d9\uc73c\ub85c unittest\ub85c \uc2e4\ud589\ud574\uc900\ub2e4.<\/p>\n\n\n\n<p>\uc624\ub298\uc740 \uc5ec\uae30\uae4c\uc9c0. \uc774\uac83\ub9cc \uac00\uc9c0\uace0\ub3c4 \uae30\ubcf8\uc801\uc778 unit test\ub294 \uc791\uc131\ud560 \uc218 \uc788\uc744 \uac83\uc774\ub2e4. \ub098\uba38\uc9c0\ub294 \uc880 \ub354 \uacf5\ubd80\ud558\uace0 \ucd5c\uc885\uc801\uc73c\ub860 Kotlin\uc744 \ubaa9\ud45c\ub85c.<\/p>\n\n\n\n<p>\ub098\ub97c \uc704\ud55c \uae30\ub85d\uc73c\ub85c \ub300\ucda9 \uc801\uc5c8\uc5b4\uc57c \ud558\ub294\ub370, \uc5b4\ub290\uc0c8 \ubb34\uc2a8 \ud29c\ud1a0\ub9ac\uc5bc \ucc98\ub7fc \uc0c1\uc138\ud558\uac8c \uc801\uace0 \uc788\ub294 \ub098\ub97c \ubc1c\uacac\ud588\ub2e4. \ube14\ub85c\uadf8\uae00\ub85c \uc5d0\ub108\uc9c0\ub97c \ub9ce\uc774 \ube8f\uae30\uae30\ub3c4 \uc2eb\uace0, \uc644\ubcbd\ud558\ub824\uace0 \uc2a4\ud2b8\ub808\uc2a4 \ubc1b\uae30\ub3c4 \uc2eb\ub2e4. \ub2f4\ubd80\ud130\ub294 \uc880 \ub354 \ub300\ucda9 \uc801\uc5b4\uc57c\uc9c0 \u314b\u314b\u314b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc694\uc998 \ub108\ubb34 \uc624\ub7ab\ub9cc\uc5d0 \ucf54\ub529\uc744 \ud558\ub2e4\ubcf4\ub2c8, unit test\ub3c4 \ub2e4 \uae4c\uba39\uace0 kotlin\uc5d0\uc11c\ub294 \uc5b4\ub5bb\uac8c \ud574\uc57c\ud560\uc9c0 \ub9c9\ub9c9\ud588\ub2e4. unit test\ub97c \ub2e4\ub8e8\ub294\ub370\uc5d0\ub294 \uc544\ubb34\ub798\ub3c4 python\uc774 \ud3b8\ud558\uace0 \uc26c\uc6b4\uac70 \uac19\uc544\uc11c \uc77c\ub2e8 python\uc5d0\uc11c\uc758 unit test\ub97c \ubcf4\ub294\uc911. \uc544\uc9c1 \ubcfc\uac8c \ub9ce\uc740\ub370, \ud55c\ubc88\uc5d0 \ub2e4 \uae30\ub85d\ud558\ub824\uba74 \ub9ce\uc73c\ub2c8\uae4c \uc77c\ub2e8 \uae30\ubcf8\uc801\uc778\uac70\ub9cc \uae30\ub85d\ud574\ubcf8\ub2e4. \uc8fc\ub85c \ucc38\uace0\ud55c \uacf3\uc740 \uc720\ud2ad\uc5d0\uc11c \uc544\ub798\uc5d0 \ubcf4\uc774\ub294 Python Tutorial: Unit Testing Your Code with the <a href=\"http:\/\/batmask.net\/index.php\/2020\/03\/13\/225\/\" class=\"btn btn-link continue-link\">\ub354 \uc77d\uae30<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[35,73,74,145,55],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-python","tag-python","tag-unit-test","tag-unittest","tag-unittest-kr","tag-python-kr"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/comments?post=225"}],"version-history":[{"count":5,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":3413,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions\/3413"}],"wp:attachment":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/media?parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/categories?post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/tags?post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}