投稿時間:2022-11-14 11:19:58 RSSフィード2022-11-14 11:00 分まとめ(21件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT @IT 全フォーラム 最新記事一覧 言語ランキング、首位Pythonが差を広げる中、新興言語でトップ20に入った注目株は? https://atmarkit.itmedia.co.jp/ait/articles/2211/14/news050.html python 2022-11-14 10:30:00
IT ITmedia 総合記事一覧 [ITmedia Mobile] ソフトバンクの3Gサービス、2024年1月31日に終了 https://www.itmedia.co.jp/mobile/articles/2211/14/news087.html itmediamobile 2022-11-14 10:38:00
IT ITmedia 総合記事一覧 [ITmedia News] PayPayカード ゴールド登場 常時1.5%還元 ソフトバンク通信料から10%還元 https://www.itmedia.co.jp/news/articles/2211/14/news086.html itmedianewspaypay 2022-11-14 10:24:00
IT ITmedia 総合記事一覧 [ITmedia News] TwitterのマスクCEO、新たな認証方法をツイート「最終判断はTwitterがやるしかないが」 https://www.itmedia.co.jp/news/articles/2211/14/news083.html itmedianewstwitter 2022-11-14 10:04:00
AWS AWS Japan Blog 2022 年 9 月の AWS Black Belt オンラインセミナー資料及び動画公開のご案内 https://aws.amazon.com/jp/blogs/news/2022-09-aws-blackbelt/ awsblackbelt 2022-11-14 01:37:08
js JavaScriptタグが付けられた新着投稿 - Qiita TypeScriptの型引数におけるextendsがなかなか覚えられないのでもう一回調べてみた https://qiita.com/kajikaji/items/279592682a764ca3b218 extends 2022-11-14 10:41:48
Program @IT Coding Edgeフォーラム 最新記事一覧 言語ランキング、首位Pythonが差を広げる中、新興言語でトップ20に入った注目株は? https://atmarkit.itmedia.co.jp/ait/articles/2211/14/news050.html python 2022-11-14 10:30:00
golang Goタグが付けられた新着投稿 - Qiita Goでjsのmapやfindなどを使いたい https://qiita.com/s_yasunaga/items/e6552dc80dfa5211a157 typeskillnamestringcons 2022-11-14 10:05:15
技術ブログ Developers.IO Config ルールで特定のリソースタイプが評価されないときの対処方法 https://dev.classmethod.jp/articles/tsnote-config-resource-types-evaluate-01/ config 2022-11-14 01:50:38
技術ブログ Developers.IO ENIデタッチ時エラー「The network interface at device index 0 and networkcard index 0 cannot be detached.」を回避するには https://dev.classmethod.jp/articles/tsnote-ec2-eni-detached-delete-error/ ENIデタッチ時エラー「Thenetworkinterfaceatdeviceindexandnetworkcardindexcannotbedetached」を回避するには困っていることENIを削除したいです。 2022-11-14 01:24:13
技術ブログ Developers.IO EC2にTableau Serverをインストールする https://dev.classmethod.jp/articles/tableau-srv-install-on-windows-srv/ tablea 2022-11-14 01:18:51
海外TECH DEV Community 🧪🐍✨Unit Testing Python Code With The unittest Framework https://dev.to/saminarp/unit-testing-python-code-with-the-unittest-framework-21d8 Unit Testing Python Code With The unittest FrameworkUnit testing is an important part of software development as it isolates different components of a software program or system and checks if it operates the right way It ensures that the code meets quality standards and that flaws or bugs in a system can be properly traced back to the isolated unit of code that is failing and remedy the failure promptly My static site generator rwar is evolving and getting better over time which means I need to ensure that the code is professional and of high quality Also being able to work with testing frameworks and learning them well can help you stand out during interviews The learning curve I was not used to writing tests much for the personal projects and small group projects I have worked on so far which is why thinking of code from a test driven perspective was challenging for me I could feel my neurons firing as I was trying hard to think how to put all the unit testing pieces together Until now I only had a little bit of experience working with the Jest testing framework for JavaScript and Junit for Java so I had to go through a big learning curve to understand the unittest framework This explanation was really useful for me to get an overview of what unittest is and how to get started with it I used to underestimate the importance of reading documentation but I know now how crucial that skill is Why unittest frameworkUpon doing some research on some of the most popular testing frameworks for Python I came across pytest nose and unittest They are all great tools however I decided to give unittest a try for this project because unittest was inspired by JUnit which I had some prior experience with It is always good to experiment and learn different frameworks to eventually find out what we like most I am going to give pytest a try for my next Python project Each testing framework has its conventions for naming files and structuring code which is another important reason to look at examples and go through the documentation for the framework of your choice Having a good test plan It is really important to have a good test plan before starting Understanding what your code doesWhat kind of inputs the function takesWhat are the program s functions What are the expected outputs Good and bad test scenariosThink of the success cases and cases that are anomalies For example if you are building a school management system adding the same student twice should result in some sort of warning What does not need testingA good example of what does not need testing would be functions from external packages Another example would be a program invoking functions where the code was already tested Writing the testsThen comes the test writing part For example if you are building a school management system then you can test for functions such as adding students loading an existing student adding the same student twice and so on The process For my project I have created two test files test parser py and test ssg py under the test folder As stated in this documentation unittest requires that You put your tests into classes as methodsYou use a series of special assertion methods in the unittest TestCase class instead of the built in assert statement To get started with unittest I first had to import unittest Then I created a class SSGTest that inherits from the TestCase class and it is meant to test my class SSGclass SSGTest unittest TestCase Similarly I have done this for my other test parser py file class CLIParser unittest TestCase An example It is hard to go over all the test I have written for my project because there are many However here is an example from test parser py Notice how I have used descriptive names for my test Here I am checking if the test has any input files or not class CLIParser unittest TestCase def test without input self with self assertRaises SystemExit as err get parser args self assertEqual err exception code No input directory provided assertRaises verifies that a specific exception gets raised with self assertRaises SomeException do something assertEqual checks for an expected result with self assertRaises SomeException as cm do something the exception cm exceptionself assertEqual the exception error code When to use setUp and tearDown If you go through my code on test ssg py you will see that I have used the setUp and tearDown methods For every test in test ssg py a temporary file was created which needed to be deleted after the test which is what I could accomplish with setUp and tearDown These were repetitive processes that I could simplify using these methods Imagine you have a suite with tests and of them require the same setup teardown code while the don t setup and teardown gives you a nice way to refactor the code It is often used when we need to create a fake database for testing purposes or for mocking purposes Here is an example of how I have used it in my code class SSGTest unittest TestCase def setUp self self tempdir tempfile TemporaryDirectory self output self tempdir nameself input os path join self output input os mkdir self input self stylesheet test stylesheet link def tearDown self self tempdir cleanup Test discovery Test discovery is the process of locating where the tests are in your codebase This means that you don t have to explicitly state where the tests are located as the testing framework can automatically locate them based on the matching patterns of the naming convention In this case it will look for test py files As stated in the documentation Unittest supports simple test discovery To be compatible with test discovery all of the test files must be modules or packages importable from the top level directory of the project this means that their filenames must be valid identifiers Test discovery is implemented in TestLoader discover but can also be used from the command line The basic command line usage is cd project directorypython m unittest discoverUpon running that command it shows the number of passing and failing tests I had two tests that were failing so I went back and fixed those before pushing my changes to GitHub Documentation ️A good software or system is properly documented I used to underestimate the value of documentation until I participated in Hacktoberfest and had to work on large open source projects Some interesting projects I wanted to contribute to had unclear documentation and even though I wanted to work on them I just couldn t The projects I ended up contributing to were all properly structured and had clear documentation The same goes for rwar I am trying to write clear documentation so that anyone interested in using it or contributing to it will find it easy to do so I have added the instructions for testing on the CONTRIBUTING md file For the full codebase please feel free to check it out on GitHub 2022-11-14 01:26:59
金融 日本銀行:RSS 【挨拶】黒田総裁「最近の金融経済情勢と金融政策運営」(名古屋) http://www.boj.or.jp/announcements/press/koen_2022/ko221114a.htm 金融政策 2022-11-14 10:05:00
ニュース ジェトロ ビジネスニュース(通商弘報) JAL、11月10日から成田発・上海行き直行便運航を再開 https://www.jetro.go.jp/biznews/2022/11/ae25015f2ec58e9a.html 運航 2022-11-14 01:20:00
海外ニュース Japan Times latest articles Democrats defy ‘red wave’ forecasts to keep Senate control https://www.japantimes.co.jp/news/2022/11/14/world/politics-diplomacy-world/democrats-retain-senate-control/ Democrats defy red wave forecasts to keep Senate controlDemocratic leaders portrayed the better than expected performance as vindication of their agenda and a rebuke of election denialism and extremist candidates on the right 2022-11-14 10:17:07
ビジネス ダイヤモンド・オンライン - 新着記事 ツイッターは不要不急か 広告主試すには時期最悪 - WSJ発 https://diamond.jp/articles/-/312905 不要不急 2022-11-14 10:24:00
ビジネス 電通報 | 広告業界動向とマーケティングのコラム・ニュース 「メタバース」か、「メタトラップ」か?長期的成長に必要な視点 https://dentsu-ho.com/articles/8398 designmind 2022-11-14 10:21:42
京都 烏丸経済新聞 京都で「Sony Park展」 ソニーの「今と昔」を2会場で体感する企画 http://karasuma.keizai.biz/headline/3683/ sonypark 2022-11-14 10:39:25
ビジネス 東洋経済オンライン 【唇に水ぶくれ】口唇ヘルペス繰り返す根本要因 子供と大人の初感染は、症状も大きく異なる | 「病気」と「症状」の対処法 | 東洋経済オンライン https://toyokeizai.net/articles/-/629835?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-11-14 11:00:00
マーケティング MarkeZine 【開催間近】デジタル広告のオフライン効果をどう測る?購買データを使った分析を解説 http://markezine.jp/article/detail/40586 間近 2022-11-14 10:30:00
マーケティング AdverTimes 佐藤雅彦が放った「ディレクターの時代の終焉」を告げる爆弾発言 https://www.advertimes.com/20221114/article401141/ 佐藤雅彦 2022-11-14 01:09:39

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)