{"id":303841,"date":"2020-05-19T09:00:42","date_gmt":"2020-05-19T09:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=303841"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=303841","title":{"rendered":"\u041a\u0430\u043a \u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u044c Python \u0442\u0435\u0441\u0442\u044b"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/502278\/\">\n<p>\u0418 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u043d\u0435 \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8y\/cs\/up\/8ycsupczpt7svmenam06_zvk3qq.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<h4 id=\"vvodnaya\">\u0412\u0432\u043e\u0434\u043d\u0430\u044f<\/h4>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0442\u0435\u0441\u0442\u044b. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0443 \u043d\u0435\u0433\u043e \u0431\u044b\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u043b\u0438\u044f\u043b\u0438 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0415\u0433\u043e \u0441\u0443\u0442\u044c \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043a\u0430\u043d\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.\u00a0<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432 python \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u043e\u0432. \u042d\u0442\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u043a\u043e\u0433\u0434\u0430:<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 Python \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 xml, \u0438\u0437 json \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u043b\u0438 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u043d\u0435\u0440\u044f\u0448\u043b\u0438\u0432\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a \u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 <code>textwrap.dedent<\/code>.<\/li>\n<li>\u041d\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445. \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0434 \u0442\u0435\u0441\u0442\u044b \u0432\u044b\u0445\u043b\u043e\u043f \u0441\u0433\u0435\u043d\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044d\u0442\u043e \u0441\u043a\u0443\u0447\u043d\u0430\u044f \u0440\u0443\u0442\u0438\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430.<\/li>\n<li>\u042d\u0442\u043e \u0444\u0430\u0437\u0430 \u0441\u043f\u0430\u0441\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0422\u0435\u0441\u0442\u043e\u0432 \u043d\u0435\u0442 \u0438\u043b\u0438 \u043c\u0430\u043b\u043e, \u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e. \u041f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u043b \u0443\u0436\u0435 \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435. \u0422\u0430\u043a\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u0448\u0451\u0432\u044b\u043c \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0448\u0430\u0433\u043e\u043c.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"podhod-k-resheniyu\">\u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e<\/h4>\n<p>  <\/p>\n<p>\u042f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c, \u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0441\u0432\u043e\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 testoot \u0434\u043b\u044f \u041f\u0438\u0442\u043e\u043d\u0430 3.4+.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0438 \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u0430\u0445.\u00a0\u0424\u0430\u0439\u043b\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0430\u044f \u043d\u0430\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>foo<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u0441\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def foo(): \u00a0 \u00a0 return {'a': 1}  def test_simple(testoot: Testoot): \u00a0 \u00a0 testoot.test(foo())<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0435\u0441\u0442\u044b \u0441 <code>pytest<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pytest -s tests<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0442\u0435\u0441\u0442\u043e\u0432. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0444\u0438\u043a\u0441\u0442\u0443\u0440\u0430 testoot \u0442\u0438\u043f\u0430 Testoot \u043e\u043f\u0438\u0448\u0443 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def foo(): \u00a0 \u00a0 return {'a': 2}  def test_simple(testoot: Testoot): \u00a0 \u00a0 testoot.test(foo())<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c <code>AssertionError<\/code> \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0442\u0435\u0441\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">...\u2028def test_simple(testoot: Testoot): &gt;\u00a0 \u00a0 \u00a0 \u00a0testoot.test(foo()))  cls = &lt;class 'testoot.ext.pytest.PytestComparator'&gt;, test_obj = {'a': 2}, canon_obj = {'a': 1}  \u00a0 \u00a0 @classmethod \u00a0 \u00a0 def compare(cls, test_obj: any, canon_obj: any): \u00a0 \u00a0 \u00a0 \u00a0 &quot;&quot;&quot;Compares objects&quot;&quot;&quot; &gt;\u00a0 \u00a0 \u00a0 \u00a0assert test_obj == canon_obj E\u00a0 \u00a0 \u00a0 \u00a0AssertionError<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"sohranenie-novyh-dannyh\">\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445. \u041f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u043d\u0435 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0435\u0441\u0442\u044b \u0441 \u0444\u043b\u0430\u0433\u043e\u043c <code>--canonize<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pytest -s tests --canonize<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0432\u0438\u0434\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u0451\u0442 pytest (\u0444\u043b\u0430\u0433\u0438 &#8212;verbose \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">tests\/test_console\/test_console.py [tests\/test_console\/test_console.py::test_simple] {'a': 2} == {'a': 1} ~Differing items: ~{'a': 2} != {'a': 1} ~Use -v to get the full diff Canonize [yn]? y .<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0430\u043d\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u0438 \u0442\u0435\u0441\u0442 \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u0443\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0442\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u0430\u043a \u0438 \u0431\u0435\u0437 \u0444\u043b\u0430\u0433\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u043a\u043e\u0434\u043e\u043c. \u0422\u0435\u043a\u0443\u0449\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0430\u0446\u0438\u0438:\u00a0<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 pickle. \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0438\u0437 Python. \u041d\u043e \u0444\u043e\u0440\u043c\u0430\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u0432 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 VCS \u0431\u0435\u0437 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0447\u0438\u0442\u0430\u044e\u0449\u0438\u0445 pickle \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e<\/li>\n<li>\u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 bytes. \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043b\u044e\u0431\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b.<\/li>\n<li>\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 str. \u0422\u043e\u043b\u044c\u043a\u043e utf-8 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430\u043c\u0438.<\/li>\n<li>json \u0444\u043e\u0440\u043c\u0430\u0442. \u0422\u043e\u043b\u044c\u043a\u043e json, \u0437\u0430\u0442\u043e \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441 \u043e\u0442\u0441\u0442\u0443\u043f\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0438\u0444\u0444\u044b \u0443\u0434\u043e\u0431\u043d\u043e.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447, \u0433\u0434\u0435 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0442\u0438\u043f\u044b \u0438 \u0432 VCS \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430 \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u0434 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def test_filename(testoot: Testoot): \u00a0 \u00a0 d = Path(testoot.storage.root_dir \/ 'hello.json') \u00a0 \u00a0 d.write_text('{}')  \u00a0 \u00a0 testoot.test_filename(str(d))<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"kak-konfigurirovat\">\u041a\u0430\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/h4>\n<p>  <\/p>\n<p>\u0412\u044b\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0444\u0438\u043a\u0441\u0442\u0443\u0440\u044b \u0442\u0438\u043f\u0430 Testoot. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043b\u0438\u0436\u0435 \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">import pytest  from testoot.ext.pytest import PytestContext from testoot.ext.simple import DefaultBaseTestoot from testoot.pub import AskCanonizePolicy, PickleSerializer, \\ \u00a0 \u00a0 LocalDirectoryStorage, ConsoleUserInteraction, Testoot  @pytest.fixture(scope='module') def base_testoot(): \u00a0 \u00a0 regress = DefaultBaseTestoot( \u00a0 \u00a0 \u00a0 \u00a0 storage=LocalDirectoryStorage('.testoot'), \u00a0 \u00a0 ) \u00a0 \u00a0 regress.storage.ensure_exists() \u00a0 \u00a0 yield regress  @pytest.fixture(scope='function') def testoot(base_testoot, request): \u00a0 \u00a0 fixture = Testoot(base_testoot, PytestContext(request)) \u00a0 \u00a0 yield fixture<\/code><\/pre>\n<p>  <\/p>\n<p>DefaultBaseTestoot \u044d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Testoot \u043a \u043d\u0435\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0442\u0435\u0441\u0442\u0430 (scope=&#8217;function&#8217;). \u0418\u0437 pytest \u0444\u0438\u043a\u0441\u0442\u0443\u0440\u044b request \u0443\u0437\u043d\u0430\u0451\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  <\/p>\n<p>\u0421\u0430\u043c DefaultBaseTestoot \u044d\u0442\u043e BaseTestoot \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e .testoot \u0441 pickle-\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a\u0430\u043d\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u0444\u043b\u0430\u0433\u0435 <code>--canonize<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">regress = DefaultBaseTestoot( \u00a0 \u00a0 serializer=JsonSerializer(), )<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f pytest \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">class PytestComparator(Comparator): \u00a0 \u00a0 @classmethod \u00a0 \u00a0 def compare(cls, test_obj: any, canon_obj: any): \u00a0 \u00a0 \u00a0 \u00a0 &quot;&quot;&quot;Compares objects&quot;&quot;&quot; \u00a0 \u00a0 \u00a0 \u00a0 assert test_obj == canon_obj<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0438 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 <code>PytestContext(request, serializer=BinarySerializer(), comparator=PytestComparator())<\/code>. \u0418\u043b\u0438 \u0443\u0436\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">def test_str(testoot: Testoot): \u00a0 \u00a0 result = 'abc' \u00a0 \u00a0 regress.test(result, serializer=StringSerializer(), comparator=PytestComparator())<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0441\u0442\u0435 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043d\u0430\u0434 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c\u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 BaseTestoot.<\/p>\n<p>  <\/p>\n<h4 id=\"vazhno-uchest\">\u0412\u0430\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c<\/h4>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0451\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u043a\u0430\u043d\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0438\u0445 \u0432 \u043a\u043e\u0434\u0435. \u0414\u0430, \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.\u00a0<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0434\u0430\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u043d\u0438\u043a\u0430\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<h4 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0431\u044b\u043b \u043e\u0431\u0437\u043e\u0440 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Python. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c!<\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430: <code>pip3 install testoot<\/code><br \/>  \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: <a href=\"https:\/\/testoot.readthedocs.io\" rel=\"nofollow\">https:\/\/testoot.readthedocs.io<\/a><br \/>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434: <a href=\"https:\/\/github.com\/aptakhin\/testoot\" rel=\"nofollow\">https:\/\/github.com\/aptakhin\/testoot<\/a><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/502278\/\"> https:\/\/habr.com\/ru\/post\/502278\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/502278\/\">\n<p>\u0418 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u043d\u0435 \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Python.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8y\/cs\/up\/8ycsupczpt7svmenam06_zvk3qq.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<h4 id=\"vvodnaya\">\u0412\u0432\u043e\u0434\u043d\u0430\u044f<\/h4>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0431\u044b\u043b \u043f\u0440\u043e\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0441\u044f \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0442\u0435\u0441\u0442\u044b. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0443 \u043d\u0435\u0433\u043e \u0431\u044b\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u043b\u0438\u044f\u043b\u0438 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0415\u0433\u043e \u0441\u0443\u0442\u044c \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043a\u0430\u043d\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.\u00a0<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0432 python \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u043e\u0432. \u042d\u0442\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u043a\u043e\u0433\u0434\u0430:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-303841","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=303841"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303841\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}