{"id":345151,"date":"2023-02-08T21:01:25","date_gmt":"2023-02-08T21:01:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345151"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345151","title":{"rendered":"<span>\u041a\u0430\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 Databricks: Nutter Framework<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f23\/944\/f89\/f23944f89774454e220faa6879be308a.png\" width=\"780\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f23\/944\/f89\/f23944f89774454e220faa6879be308a.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>Disclaimer<\/h2>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Databricks, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0438, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0434\u0436\u043e\u0431\u044b (\u0432\u043e\u0440\u043a\u0444\u043b\u043e\u0443\u0441) \u0432 \u043d\u0451\u043c. \u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0445\u0430\u0431\u0440\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/post\/568276\/\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u042f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0441\u0435\u0440\u0438\u044e \u0441\u0442\u0430\u0442\u0435\u0439, \u0433\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u0441\u0432\u043e\u0439 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 BigData. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/701588\/\">\u043d\u0430\u0439\u043c\u0443 \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442\u043e\u0432<\/a>, \u0432\u0442\u043e\u0440\u0430\u044f &#8212; <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/705446\/\">\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/a> \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u0447\u0438\u0441\u0442\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u044f\u0441\u043d\u043e, \u0442\u043e \u0432\u043e\u0442 \u0441 BigData \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 Java &#8212; \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c <a href=\"https:\/\/junit.org\/junit5\/\">JUnit<\/a>, \u0430 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0437\u0430\u0431\u043e\u0442\u044f\u0442\u0441\u044f \u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Spring \u043f\u043e\u0441\u0432\u044f\u0449\u0430\u0435\u0442 \u044d\u0442\u043e\u043c\u0443 \u043e\u0447\u0435\u043d\u044c <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/reference\/html\/testing.html#testing\">\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u0442\u043e\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e: \u043e\u0442 <a href=\"https:\/\/www.selenium.dev\/\">Selenium<\/a> \u0434\u043e <a href=\"https:\/\/jestjs.io\/\">JestJs<\/a>. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u0438 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043e\u0434\u043d\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 (\u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 Ethereum \u0441\u0435\u0442\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <a href=\"https:\/\/trufflesuite.com\/\">Truffle Suite<\/a>)<\/p>\n<p>\u041d\u0430 \u041f\u0438\u0442\u043e\u043d\u0435 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u044d\u0442\u043e\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d. \u0414\u0430\u0436\u0435 \u0441\u0430\u043c Databricks, \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430\u0448\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u043f\u0443\u0442\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e: <a href=\"https:\/\/docs.databricks.com\/notebooks\/testing.html\">Unit testing for notebooks<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0433\u043e Databricks. \u0410 \u0443 \u043d\u0430\u0441 \u043a\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c GitLab, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0436\u0435 Databricks. \u041e\u0447\u0435\u043d\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u043e\u0442\u0434\u0435\u043b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0434\u0430\u0451\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0441\u0435\u0442\u044c.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u044f\u043c\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u043e\u0432 Databricks: <a href=\"https:\/\/docs.databricks.com\/notebooks\/test-notebooks.html\">Test Databricks notebooks<\/a>. \u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432: \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 Databricks.<\/p>\n<p>\u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0438 \u0442\u0430\u043a, \u0438 \u0441\u044f\u043a, \u043d\u043e \u0432\u0441\u0451 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e \u0432\u0435\u0441\u044c\u043c\u0430 &#171;\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u043e&#187;. \u0418 \u0442\u0443\u0442 \u043c\u044b \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/microsoft\/nutter\">Nutter Framework<\/a>. \u0422\u043e, \u0447\u0442\u043e \u043e\u043d \u043e\u0431\u0435\u0449\u0430\u043b \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439. \u0420\u0435\u0441\u043f\u0435\u043a\u0442 Microsoft \u0437\u0430 \u0442\u0430\u043a\u043e\u0439 \u0442\u0443\u043b \u0432 opensource.<\/p>\n<h2>Nutter: \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/h2>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 &#8212; \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0438 \u0432 Databricks. Nutter \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e.<\/p>\n<h3>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442<\/h3>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 nutter \u043d\u0430 \u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0438:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1f5\/5cd\/b09\/1f55cdb0931e625f79ee66539e7644ee.png\" width=\"500\" height=\"286\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f5\/5cd\/b09\/1f55cdb0931e625f79ee66539e7644ee.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 NutterFixture \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"python\">from runtime.nutterfixture import NutterFixture, tag class FirstTestFixture(NutterFixture):     def run_test(self):         dbutils.notebook.run('notebook_to_test', 600)     def assertion_test(self):         assert True     def run_test_secundo(self):         dbutils.notebook.run('another_notebook_to_test', 600)     def assertion_test_secundo(self):         assert True<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0430\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"python\">result = FirstTestFixture().execute_tests() print(result.to_string())<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (\u0441\u043c. \u043d\u0438\u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c). \u0418 \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 nutter-cli, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430:<\/p>\n<pre><code class=\"python\">result.exit(dbutils)<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435: \u0432\u043d\u0443\u0442\u0440\u0438 <code>result.exit<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>dbutils.notebook.exit()<\/code> , \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e Databricks \u043f\u0440\u044f\u0447\u0435\u0442 \u0432\u0441\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434 <code>print<\/code> . \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u044f\u043c\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430\u0445, \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441 <code>exit<\/code> \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0441\u0442\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 1 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 3 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p><em>before_(testname)<\/em> &#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0435\u0441\u044f \u043f\u0435\u0440\u0435\u0434 <code>run<\/code> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p><em>run_(testname)<\/em>\u00a0&#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 <code>before<\/code> (\u0435\u0441\u043b\u0438 \u043e\u043d \u0438\u043c\u0435\u0435\u0442\u0441\u044f) \u0438\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u043c. \u0422\u0443\u0442 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p><em>assertion_(testname)<\/em> &#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 <code>run<\/code> (\u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c). \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>assert<\/code> \u0438\u0437 \u043b\u044e\u0431\u044b\u0445 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b 1 assertion-\u043c\u0435\u0442\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p><em>after_(testname)<\/em> &#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 <code>assertion<\/code>. \u041e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043b\u0438 &#171;\u043f\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c&#187; \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u043c\u0435\u0442\u043e\u0434\u044b <code>run_checkpoint_location_generation<\/code> \u0438 <code>assertion_checkpoint_location_generation<\/code> \u0431\u0443\u0434\u0443\u0442 \u0442\u0440\u0430\u043a\u0442\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a 1 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<ul>\n<li>\n<p><em>before_all<\/em><\/p>\n<\/li>\n<li>\n<p><em>after_all<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 <em>assertion <\/em>\u043d\u0430 1 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441, \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>before_all<\/em> \u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0442\u0435\u0441\u0442\u0430 \u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. <\/p>\n<pre><code class=\"python\">from runtime.nutterfixture import NutterFixture, tag class MultiTestFixture(NutterFixture):   def before_all(self):     dbutils.notebook.run('notebook_under_test', 600, args)      #...   def assertion_test_case_1(self):     #...   def assertion_test_case_2(self):     #...   def after_all(self):     #... <\/code><\/pre>\n<p>Nutter \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 Nutter \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"python\"> class TestFixture(NutterFixture):   def __init__(self):     self.file = '\/data\/myfile'     NutterFixture.__init__(self)<\/code><\/pre>\n<h3>\u041f\u0430\u0440\u0430\u043b\u0435\u043b\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f Nutter`\u0430 (0.1.35) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>NutterFixtureParallelRunner<\/code>\u00a0:<\/p>\n<pre><code class=\"python\">from runtime.runner import NutterFixtureParallelRunner #... parallel_runner = NutterFixtureParallelRunner(num_of_workers=2) parallel_runner.add_test_fixture(FirstTestFixture()) parallel_runner.add_test_fixture(AnotherTestFixture()) result = parallel_runner.execute() print(result.to_string())<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"bash\">Notebook: N\/A - Lifecycle State: N\/A, Result: N\/A Run Page URL: N\/A ============================================================ PASSING TESTS ------------------------------------------------------------ test_another_case (40.98681362399998 seconds) test (40.99089991400001 seconds) test_secundo (10.680228194999927 seconds)   ============================================================<\/code><\/pre>\n<h3>Nutter CLI<\/h3>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0444\u0438\u0448\u0435\u043a Nutter`\u0430 &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Nutter \u0447\u0435\u0440\u0435\u0437 <code>pip<\/code>:<\/p>\n<pre><code class=\"bash\">$ pip install nutter<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0434\u0438\u043c 2 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f Databricks:<\/p>\n<p>Linux<\/p>\n<pre><code>export DATABRICKS_HOST=&lt;HOST> export DATABRICKS_TOKEN=&lt;TOKEN><\/code><\/pre>\n<p>Windows PowerShell<\/p>\n<pre><code>$env:DATABRICKS_HOST=\"HOST\" $env:DATABRICKS_TOKEN=\"TOKEN\"<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u044b:<\/p>\n<pre><code class=\"bash\"> $ nutter list \/common\/test\/nutter<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<pre><code class=\"bash\">Nutter Version 0.1.35 ++++++++++++++++++++++++++++++++++++++++++++++++++  --> Looking for tests in \/common\/test\/nutter --> 3 tests found  Tests Found ------------------------------------------------------- Name:   test_StreamDeltaTransformation_multi Path:   \/common\/test\/nutter\/test_StreamDeltaTransformation_multi  Name:   test_RefineryFromJsonMerge_single Path:   \/common\/test\/nutter\/test_RefineryFromJsonMerge_single  Name:   test_StreamDeltaTransformation_single Path:   \/common\/test\/nutter\/test_StreamDeltaTransformation_single  -------------------------------------------------------  Total: 3<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0442\u0435\u0441\u0442:<\/p>\n<pre><code class=\"bash\"> $ nutter run \/common\/test\/nutter\/test_StreamDeltaTransformation_single --cluster_id '0000-099999-abcdabcd'<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 (\u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 nutter)<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u044b, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code class=\"bash\">$ nutter run \/common\/test\/nutter\/ --cluster_id 0123-12334-tonedabc --recursive <\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 <code>test_<\/code><\/p>\n<p>\u0424\u043b\u0430\u0433 <code>--recursive<\/code>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0446\u0438\u044e <code>--notebook_params<\/code>:<\/p>\n<pre><code class=\"bash\">$ nutter run \/common\/test\/nutter\/* --cluster_id 0123-12334-tonedabc --notebook_params \"{\\\"example_key_1\\\": \\\"example_value_1\\\", \\\"example_key_2\\\": \\\"example_value_2\\\"}\"<\/code><\/pre>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u0430<\/h2>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e <a href=\"https:\/\/habr.com\/ru\/users\/raukasky\/\">@raukasky<\/a> \u0437\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<pre><code class=\"python\"># \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0438\u0436\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 yaml-\u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043d\u0430\u0448\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c %run ..\/configs\/stream_delta_transformation_test_cases #... from runtime.runner import NutterFixtureParallelRunner from runtime.nutterfixture import NutterFixture from cds_utils.platform import ConfigRunner # \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b #... class TestCase_01(NutterFixture):     def __init__(self):         self.test_uc_path = 'dataservices_nonprod.test_nonprod'         self.s3_path = 's3:\/\/super_bucket.data'         NutterFixture.__init__(self)     def before_all(self):         # \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u0442\u043e \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435         ConfigRunner(dbutils, spark).run_yaml_config(param_yaml=test_case_01, notebook_path='\/..\/..\/..\/cds_platform\/stream_delta_transformation')     def assertion_isExistTable(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u043e\u0437\u0434\u0430\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443         assert(spark.catalog.tableExists(f'{self.test_uc_path}.tindata_expected')==True)     def assertion_table_location(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0437\u0430\u0434\u0430\u043d \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 (\u043a\u0430\u043a external)         location = sql(f\"describe detail {self.test_uc_path}.tindata_expected\").select('location').collect()[0]['location']         assert(location == f'{self.s3_path}\/test\/hive\/test_nonprod\/tindata_expected')     def assertion_checkpoint_location(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442 \u0435\u0441\u0442\u044c, \u0438 \u043e\u043d \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435         location = [file.path for file in dbutils.fs.ls(f'{self.s3_path}\/test\/checkpoint\/test_nonprod\/tindata_expected')][0]         assert(location == f'{self.s3_path}\/test\/checkpoint\/test_nonprod\/tindata_expected\/tindata\/')     def assertion_partitions(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0438\u043c\u0435\u044e\u0442 \u0432\u0435\u0440\u043d\u044b\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 (\u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 yaml-\u043a\u043e\u043d\u0444\u0438\u0433\u0435)         partitions = sql(f\"describe detail dataservices_nonprod.test_nonprod.tindataxref\").select('partitionColumns').collect()[0]['partitionColumns']         assert(partitions == ['data_source_date'])     def assertion_dedupe_column(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043c, \u0447\u0442\u043e \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e         # \u0438 \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439         num_of_change = spark.sql(f\"select * from {self.test_uc_path}.tindataxref where source_id = 27 and data_source_ts = '2022-11-04T00:00:11.129+0000'\").count()         count_source = spark.sql(f\"select * from {self.test_uc_path}.tindataxref\").count()         count_target = spark.sql(f\"select * from {self.test_uc_path}.tindataxref_expected\").count()         assert(count_target == count_source-(num_of_change-1))       def after_all(self):         # \u0447\u0438\u0441\u0442\u0438\u043c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438         spark.sql(f'drop table {self.test_uc_path}.tindata_expected')         dbutils.fs.rm(f'{self.s3_path}\/test\/hive\/test_nonprod\/tindata_expected', True)         dbutils.fs.rm(f'{self.s3_path}\/test\/checkpoint\/test_nonprod\/tindata_expected', True)<\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u0443\u0440\u043e\u0432\u043d\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: \u0441\u0435\u0440\u0432\u0438\u0441 <code>stream_delta_transformation<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u043e\u043c \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443. \u041c\u044b \u043d\u0435 \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u043c\u043e\u043a\u0438 \u0438\u043b\u0438 &#171;\u0448\u043f\u0438\u043e\u043d\u0441\u043a\u0438\u0435&#187; \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0434\u0443\u0442 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u043e \u0442\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0432\u044b\u0434\u0430\u044e\u0442 \u043f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 (\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0443 \u043d\u0430\u0441 external), \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041a\u0440\u043e\u043c\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0448\u043b\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0432\u043f\u0435\u0440\u0451\u0434 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 python-\u043a\u043e\u0434, \u0442\u043e \u044d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043f\u043e\u043b\u043d\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 Delta Lake \u0432 MySql, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432 MySql \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u0418\u0442\u0430\u043a, Nutter Framework \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435:<\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043a \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0438 \u0432 Databricks;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043a\u0430\u043a \u043f\u0440\u044f\u043c\u043e \u0432 \u043d\u043e\u0443\u0442\u0443\u0431\u043a\u0430\u0445 \u0432 Databricks, \u0442\u0430\u043a \u0438 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u041d\u0435 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u043e \u043a\u0430\u043a \u0447\u0438\u0441\u0442\u044b\u0435 unit-\u0442\u0435\u0441\u0442\u044b, \u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e. \u0412\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u043b\u043e\u0441\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0434\u0435\u043f\u043b\u043e\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 GitLab CI\/CD. <a href=\"https:\/\/github.com\/microsoft\/nutter#integrating-nutter-with-azure-devops\">\u041a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f Azure<\/a> \u0435\u0441\u0442\u044c \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Nutter \u0441\u0442\u0430\u043b \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0438 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u043c <a href=\"https:\/\/otus.pw\/aAYG\/\">\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0432\u0435\u0431\u0438\u043d\u0430\u0440<\/a> \u043e\u0442 OTUS, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443\u0442 \u043e \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0431 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445, \u043f\u043e\u043b\u044c\u0437\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u0430\u0445 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u0432\u0435\u0431\u0438\u043d\u0430\u0440 <a href=\"https:\/\/otus.pw\/aAYG\/\">\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/company\/otus\/blog\/715524\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/715524\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>Disclaimer<\/h2>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Databricks, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0438, \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0434\u0436\u043e\u0431\u044b (\u0432\u043e\u0440\u043a\u0444\u043b\u043e\u0443\u0441) \u0432 \u043d\u0451\u043c. \u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0445\u0430\u0431\u0440\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/post\/568276\/\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u042f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0441\u0435\u0440\u0438\u044e \u0441\u0442\u0430\u0442\u0435\u0439, \u0433\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u0441\u0432\u043e\u0439 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 BigData. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/701588\/\">\u043d\u0430\u0439\u043c\u0443 \u043f\u0438\u0442\u043e\u043d\u0438\u0441\u0442\u043e\u0432<\/a>, \u0432\u0442\u043e\u0440\u0430\u044f &#8212; <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/705446\/\">\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/a> \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u0447\u0438\u0441\u0442\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u044f\u0441\u043d\u043e, \u0442\u043e \u0432\u043e\u0442 \u0441 BigData \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 Java &#8212; \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c <a href=\"https:\/\/junit.org\/junit5\/\">JUnit<\/a>, \u0430 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0437\u0430\u0431\u043e\u0442\u044f\u0442\u0441\u044f \u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Spring \u043f\u043e\u0441\u0432\u044f\u0449\u0430\u0435\u0442 \u044d\u0442\u043e\u043c\u0443 \u043e\u0447\u0435\u043d\u044c <a href=\"https:\/\/docs.spring.io\/spring-framework\/docs\/current\/reference\/html\/testing.html#testing\">\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u0442\u043e\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e: \u043e\u0442 <a href=\"https:\/\/www.selenium.dev\/\">Selenium<\/a> \u0434\u043e <a href=\"https:\/\/jestjs.io\/\">JestJs<\/a>. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d \u0438 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043e\u0434\u043d\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 (\u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 Ethereum \u0441\u0435\u0442\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <a href=\"https:\/\/trufflesuite.com\/\">Truffle Suite<\/a>)<\/p>\n<p>\u041d\u0430 \u041f\u0438\u0442\u043e\u043d\u0435 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u044d\u0442\u043e\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d. \u0414\u0430\u0436\u0435 \u0441\u0430\u043c Databricks, \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430\u0448\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u043f\u0443\u0442\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e: <a href=\"https:\/\/docs.databricks.com\/notebooks\/testing.html\">Unit testing for notebooks<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0430\u043c\u043e\u0433\u043e Databricks. \u0410 \u0443 \u043d\u0430\u0441 \u043a\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c GitLab, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0436\u0435 Databricks. \u041e\u0447\u0435\u043d\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u043e \u043e\u0442\u0434\u0435\u043b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0434\u0430\u0451\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0441\u0435\u0442\u044c.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u044f\u043c\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u043e\u0432 Databricks: <a href=\"https:\/\/docs.databricks.com\/notebooks\/test-notebooks.html\">Test Databricks notebooks<\/a>. \u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432: \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 Databricks.<\/p>\n<p>\u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0438 \u0442\u0430\u043a, \u0438 \u0441\u044f\u043a, \u043d\u043e \u0432\u0441\u0451 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e \u0432\u0435\u0441\u044c\u043c\u0430 &#171;\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u043e&#187;. \u0418 \u0442\u0443\u0442 \u043c\u044b \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/microsoft\/nutter\">Nutter Framework<\/a>. \u0422\u043e, \u0447\u0442\u043e \u043e\u043d \u043e\u0431\u0435\u0449\u0430\u043b \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439. \u0420\u0435\u0441\u043f\u0435\u043a\u0442 Microsoft \u0437\u0430 \u0442\u0430\u043a\u043e\u0439 \u0442\u0443\u043b \u0432 opensource.<\/p>\n<h2>Nutter: \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/h2>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 &#8212; \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0438 \u0432 Databricks. Nutter \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e.<\/p>\n<h3>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442<\/h3>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 nutter \u043d\u0430 \u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0438:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 NutterFixture \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"python\">from runtime.nutterfixture import NutterFixture, tag class FirstTestFixture(NutterFixture):     def run_test(self):         dbutils.notebook.run('notebook_to_test', 600)     def assertion_test(self):         assert True     def run_test_secundo(self):         dbutils.notebook.run('another_notebook_to_test', 600)     def assertion_test_secundo(self):         assert True<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0430\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"python\">result = FirstTestFixture().execute_tests() print(result.to_string())<\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 (\u0441\u043c. \u043d\u0438\u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c). \u0418 \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 nutter-cli, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430:<\/p>\n<pre><code class=\"python\">result.exit(dbutils)<\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435: \u0432\u043d\u0443\u0442\u0440\u0438 <code>result.exit<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>dbutils.notebook.exit()<\/code> , \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e Databricks \u043f\u0440\u044f\u0447\u0435\u0442 \u0432\u0441\u0435 \u0432\u044b\u0432\u043e\u0434\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434 <code>print<\/code> . \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u044f\u043c\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430\u0445, \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441 <code>exit<\/code> \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0441\u0442\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 1 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 3 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p><em>before_(testname)<\/em> &#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0435\u0441\u044f \u043f\u0435\u0440\u0435\u0434 <code>run<\/code> \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p><em>run_(testname)<\/em>\u00a0&#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 <code>before<\/code> (\u0435\u0441\u043b\u0438 \u043e\u043d \u0438\u043c\u0435\u0435\u0442\u0441\u044f) \u0438\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u043c. \u0422\u0443\u0442 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430. \u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p><em>assertion_(testname)<\/em> &#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 <code>run<\/code> (\u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c). \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>assert<\/code> \u0438\u0437 \u043b\u044e\u0431\u044b\u0445 \u043f\u0438\u0442\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b 1 assertion-\u043c\u0435\u0442\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p><em>after_(testname)<\/em> &#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 <code>assertion<\/code>. \u041e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043b\u0438 &#171;\u043f\u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c&#187; \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u043c\u0435\u0442\u043e\u0434\u044b <code>run_checkpoint_location_generation<\/code> \u0438 <code>assertion_checkpoint_location_generation<\/code> \u0431\u0443\u0434\u0443\u0442 \u0442\u0440\u0430\u043a\u0442\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a 1 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<ul>\n<li>\n<p><em>before_all<\/em><\/p>\n<\/li>\n<li>\n<p><em>after_all<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 <em>assertion <\/em>\u043d\u0430 1 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441, \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>before_all<\/em> \u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0442\u0435\u0441\u0442\u0430 \u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. <\/p>\n<pre><code class=\"python\">from runtime.nutterfixture import NutterFixture, tag class MultiTestFixture(NutterFixture):   def before_all(self):     dbutils.notebook.run('notebook_under_test', 600, args)      #...   def assertion_test_case_1(self):     #...   def assertion_test_case_2(self):     #...   def after_all(self):     #... <\/code><\/pre>\n<p>Nutter \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 Nutter \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"python\"> class TestFixture(NutterFixture):   def __init__(self):     self.file = '\/data\/myfile'     NutterFixture.__init__(self)<\/code><\/pre>\n<h3>\u041f\u0430\u0440\u0430\u043b\u0435\u043b\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0445 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f Nutter`\u0430 (0.1.35) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>NutterFixtureParallelRunner<\/code>\u00a0:<\/p>\n<pre><code class=\"python\">from runtime.runner import NutterFixtureParallelRunner #... parallel_runner = NutterFixtureParallelRunner(num_of_workers=2) parallel_runner.add_test_fixture(FirstTestFixture()) parallel_runner.add_test_fixture(AnotherTestFixture()) result = parallel_runner.execute() print(result.to_string())<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"bash\">Notebook: N\/A - Lifecycle State: N\/A, Result: N\/A Run Page URL: N\/A ============================================================ PASSING TESTS ------------------------------------------------------------ test_another_case (40.98681362399998 seconds) test (40.99089991400001 seconds) test_secundo (10.680228194999927 seconds)   ============================================================<\/code><\/pre>\n<h3>Nutter CLI<\/h3>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0444\u0438\u0448\u0435\u043a Nutter`\u0430 &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Nutter \u0447\u0435\u0440\u0435\u0437 <code>pip<\/code>:<\/p>\n<pre><code class=\"bash\">$ pip install nutter<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0434\u0438\u043c 2 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f Databricks:<\/p>\n<p>Linux<\/p>\n<pre><code>export DATABRICKS_HOST=&lt;HOST> export DATABRICKS_TOKEN=&lt;TOKEN><\/code><\/pre>\n<p>Windows PowerShell<\/p>\n<pre><code>$env:DATABRICKS_HOST=\"HOST\" $env:DATABRICKS_TOKEN=\"TOKEN\"<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u044b:<\/p>\n<pre><code class=\"bash\"> $ nutter list \/common\/test\/nutter<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<pre><code class=\"bash\">Nutter Version 0.1.35 ++++++++++++++++++++++++++++++++++++++++++++++++++  --> Looking for tests in \/common\/test\/nutter --> 3 tests found  Tests Found ------------------------------------------------------- Name:   test_StreamDeltaTransformation_multi Path:   \/common\/test\/nutter\/test_StreamDeltaTransformation_multi  Name:   test_RefineryFromJsonMerge_single Path:   \/common\/test\/nutter\/test_RefineryFromJsonMerge_single  Name:   test_StreamDeltaTransformation_single Path:   \/common\/test\/nutter\/test_StreamDeltaTransformation_single  -------------------------------------------------------  Total: 3<\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0442\u0435\u0441\u0442:<\/p>\n<pre><code class=\"bash\"> $ nutter run \/common\/test\/nutter\/test_StreamDeltaTransformation_single --cluster_id '0000-099999-abcdabcd'<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 (\u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 nutter)<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u044b, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code class=\"bash\">$ nutter run \/common\/test\/nutter\/ --cluster_id 0123-12334-tonedabc --recursive <\/code><\/pre>\n<p>\u0418\u043c\u0435\u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 <code>test_<\/code><\/p>\n<p>\u0424\u043b\u0430\u0433 <code>--recursive<\/code>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0446\u0438\u044e <code>--notebook_params<\/code>:<\/p>\n<pre><code class=\"bash\">$ nutter run \/common\/test\/nutter\/* --cluster_id 0123-12334-tonedabc --notebook_params \"{\\\"example_key_1\\\": \\\"example_value_1\\\", \\\"example_key_2\\\": \\\"example_value_2\\\"}\"<\/code><\/pre>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u0430<\/h2>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e <a href=\"https:\/\/habr.com\/ru\/users\/raukasky\/\">@raukasky<\/a> \u0437\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0442\u0435\u0441\u0442-\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<pre><code class=\"python\"># \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0438\u0436\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 yaml-\u043a\u043e\u043d\u0444\u0438\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043d\u0430\u0448\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c %run ..\/configs\/stream_delta_transformation_test_cases #... from runtime.runner import NutterFixtureParallelRunner from runtime.nutterfixture import NutterFixture from cds_utils.platform import ConfigRunner # \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b #... class TestCase_01(NutterFixture):     def __init__(self):         self.test_uc_path = 'dataservices_nonprod.test_nonprod'         self.s3_path = 's3:\/\/super_bucket.data'         NutterFixture.__init__(self)     def before_all(self):         # \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u0442\u043e \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u0434 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435         ConfigRunner(dbutils, spark).run_yaml_config(param_yaml=test_case_01, notebook_path='\/..\/..\/..\/cds_platform\/stream_delta_transformation')     def assertion_isExistTable(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u043e\u0437\u0434\u0430\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443         assert(spark.catalog.tableExists(f'{self.test_uc_path}.tindata_expected')==True)     def assertion_table_location(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0437\u0430\u0434\u0430\u043d \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 (\u043a\u0430\u043a external)         location = sql(f\"describe detail {self.test_uc_path}.tindata_expected\").select('location').collect()[0]['location']         assert(location == f'{self.s3_path}\/test\/hive\/test_nonprod\/tindata_expected')     def assertion_checkpoint_location(self):         # \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442 \u0435\u0441\u0442\u044c, \u0438 \u043e\u043d \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-345151","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345151","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=345151"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345151\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}