From 468b1241a5684f63f19b55df2bc4f0ca272d0eea Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 10 May 2014 13:49:24 +0200 Subject: [PATCH] fix issue512: show "" for arguments which might not be set in monkeypatch plugin. Improves output in documentation. --- CHANGELOG | 3 +++ _pytest/monkeypatch.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8094a3b09..b24d1e986 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -78,6 +78,9 @@ NEXT (2.6) functions, including unittest-style Classes. If set to False, the test will not be collected. +- fix issue512: show "" for arguments which might not be set + in monkeypatch plugin. Improves output in documentation. + 2.5.2 ----------------------------------- diff --git a/_pytest/monkeypatch.py b/_pytest/monkeypatch.py index be131bd93..9323d12f8 100644 --- a/_pytest/monkeypatch.py +++ b/_pytest/monkeypatch.py @@ -59,7 +59,11 @@ def derive_importpath(import_path): -notset = object() +class Notset: + def __repr__(self): + return "" + +notset = Notset() class monkeypatch: """ object keeping a record of setattr/item/env/syspath changes. """