<div dir="ltr">Also as far as I can tell, X has to be in the following set: [lldbutil, lldbtest, lldbinline, lldbbench].  In theory there are other possibilities (any .py file that is in packages/Python/lldbsuite/test is fair game) but I don't think I encountered any aside from those 4.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 2, 2015 at 10:12 PM Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Nov 2, 2015 at 10:02 PM Todd Fiala <<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Do you have a script you used to tweak these?<div><br></div><div>(We have a ton of stuff broken internally on this that I need to fix up).</div><div><br></div><div>We're starting to need to do quite a bit of extra typing for the package structure :-/</div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><span style="font-size:13px;line-height:19.5px">No, I just used a recursive regex replacement.  I had to find a few different patterns:</span><div style="font-size:13px;line-height:19.5px"><br></div><div style="font-size:13px;line-height:19.5px">from X import foo     # from lldbsuite.test.X import foo</div><div style="font-size:13px;line-height:19.5px">import X   # import lldbsuite.test.X as X</div><div style="font-size:13px;line-height:19.5px">import foo, X   #import foo\nimport lldbsuite.test.X as X</div><div style="font-size:13px;line-height:19.5px"><br></div><div style="font-size:13px;line-height:19.5px">and I handled each one on a case-by-case basis.</div><div style="font-size:13px;line-height:19.5px"><br></div><div style="font-size:13px;line-height:19.5px">Luckily the extra typing only comes at the import site.  If you use the syntax I suggested in #2 and #3 above (import lldbsuite.test.X as X) then the syntax at any sites where you use a definition from inside the module are the same.</div><div style="font-size:13px;line-height:19.5px"><br></div><div style="font-size:13px;line-height:19.5px">I was a little bit annoyed at the extra typing myself, but when I look into it, it's considered a "feature".  See <a href="https://www.python.org/dev/peps/pep-0328/" target="_blank">PEP 0328 - Imports: Multi-Line and Absolute/Relative</a> and as far as I can tell the way we were doing things before was considered "wrong"  :(</div><div style="font-size:13px;line-height:19.5px"><br></div><div><span style="font-size:13px;line-height:19.5px">How much of a problem is this going to be on your side?  Is there an equally "good" solution that doesn't require so much fixup on your side?</span></div><div><span style="font-size:13px;line-height:19.5px"><br></span></div><div><span style="font-size:13px;line-height:19.5px">the only fixup I encountered was in individual test cases and test suites (i.e. files that are loaded by unittest2).  Does this account for all the test failures on your side as well, or is there something else going on I missed?</span></div></div></div></blockquote></div>