making bootstrap more robust
Summary: X-link: https://github.com/facebookresearch/mobile-vision/pull/81 Pull Request resolved: https://github.com/facebookresearch/d2go/pull/283 - add `MoreMagicMock`, which handles inheritance and comparison. - also support lazy registering mocked objects (has to be `MoreMagicMock`). - don't need to skip `skip files that doesn't contain ".register()" call` since we can handle most files pretty well now. - also mock the open - delay the import for `from detectron2.utils.testing import assert_instances_allclose`; for some reason python is doing magic things if you import anything starting with `assert`, so the mocked import doesn't work. - makes log function nicer. Reviewed By: tglik Differential Revision: D36798327 fbshipit-source-id: ccda7e7583b95a24f3dde1bbe0468593dacb8663
Showing
Please register or sign in to comment