タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

Pythonとpythonとfunctionに関するclavierのブックマーク (2)

  • Implementing functional overloading in Python

    Function overloading is the ability to have multiple functions with the same name but with different signatures/implementations. When an overloaded function fn is called, the runtime first evaluates the arguments/parameters passed to the function call and judging by this invokes the corresponding implementation. int area(int length, int breadth) { return length * breadth; } float area(int radius)

    Implementing functional overloading in Python
  • 効果的なunittest - または、callFUTの秘密

    Contents unittest を効果的に使うための覚書 目的 ルール: テスト対象のモジュール(module-under-test)をテストモジュールに直接importしない ガイドライン: モジュールスコープでの依存を最小限にする ルール: 各テストメソッドでは、1つの事実だけを確認する ルール: テストメソッドは内容を表すようにしよう ガイドライン: setupはヘルパーメソッドで提供しよう。テストケースのselfで共有するのはやめよう。 ガイドライン: フィクスチャは可能な限り簡潔に ガイドライン: フックやレジストリなどの利用は注意深く ガイドライン: 依存関係を明確にするためにモックを利用する ルール: テストモジュール間でテキストを共有しない まとめ https://twitter.com/tokibito/status/412074246026698753 ということで

  • 1