You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
pythonのモックとしてminimockというライブラリがある。 日本語のドキュメント・ブログが見当たらないので使い方をここに書いておく。 minimockを構成するモジュール mock関数 -- モックを当てる。 restore関数 -- 当てたモックを解除する。 Mockクラス -- mockより詳細にモックを当てるために使うオブジェクト。 mock関数とrestore関数でモックを当てる・解除するというのはわかりやすい。 しかし、複雑なケースではMockオブジェクトを使う必要があるのでここで説明する。 あと、minimockを使う上ではまりやすい点を書く。 基本的な使い方 minimockの基本は モックに差し替えるモジュールをインポートする。 mock関数を呼ぶ。或いはMockインスタンスを代入する。 使い終わったらrestoreで戻す。 である。 例えば、以下のphilosop
Classifiers Development Status 4 - Beta Environment Web Environment Framework Django Django :: 1.4 Django :: 1.5 Django :: 1.6 Django :: 1.7 Django :: 1.8 Django :: 1.9 Intended Audience Developers License OSI Approved :: BSD License Natural Language English Operating System OS Independent Programming Language Python Python :: 2.6 Python :: 2.7 Python :: 3.3 Python :: 3.4 Python :: 3.5 This app ai
Google App Engineの開発ではPythonを使います。GAEを使ったWebアプリの開発でテスト駆動開発を行う際にも,Python的なユニットテストの文脈を活用できます。 ただし,GAEでユニットテストを行うためにはいくつかのツールやトリックが必要です。ここでは,そのテクニックを簡単に紹介します。 その1 : NoseGAEを使う Pythonのテスト用ツールにNoseがあります。このツールは,複数のディレクトリを渡り歩いて,複数のテストコードを一気に実行してくれる便利なツールです。 NoseのプラグインNoseGAEをインストールすることで,GAEアプリのテストを楽に行うことができます。「nose --with-gae」というようにオプション指定をすることでNoseGAEを利用できます。NoseGAEでは,テストコード上でGAEのモジュールやパッケージをインポートするために必
OSAF is a non-profit organization working on Chandler Project, a Note-to-Self Organizer designed for personal and small-group task management and calendaring. Chandler consists of a cross-platform desktop application (Windows, Mac OS X, Linux), the Chandler Hub Sharing Service and Chandler Server. For a view into our daily work including detailed planning and Design and Developer Documentation, vi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く