New issue 746: monkeypatch.setattr('foo.bar', raising=False) raises when foo.bar doesn't exist https://bitbucket.org/pytest-dev/pytest/issue/746/monkeypatchsetattr-foobar-raising-false
Florian Bruhin: I'm trying to patch `sys.frozen` to set it to `True`, but `sys.frozen` doesn't exist yet. This works: ```python monkeypatch.setattr(sys, 'frozen', True, raising=False) ``` This however raises: ```python monkeypatch.setattr('sys.frozen', True, raising=False) ``` ``` > monkeypatch.setattr('sys.frozen', True, raising=False) E Failed: object <module 'sys' (built-in)> has no attribute 'frozen' ``` _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit