The way the os module seems to reference posix, I don't believe we will run into any platform dependencies.  Since os determines what environment it is in then references either itself or an appropriate external module (such as posix) in __dict__, it should always work.<br>

<br>With os.readlink, the issue was that inspect.getmodule(target) was returning 'posix', so posix.__dict__ was updated when os.readlink was mocked.  os.__dict__, however, was not updated, so calling os.readlink() resulted in posix.readlink() rather than our mocked function.<br>

<br>If this doesn't seem correct, I would appreciate your feedback.<br><br>As for merging torproject/master into our branches, I'm afraid I don't know how that happened.  Should I revert to before that commit and rebase, or was this a one-time issue that we simply need to avoid in the future?<br>

<br>Best,<br>Erik & Megan<br><br><div class="gmail_quote">On Tue, Jun 19, 2012 at 3:25 PM, Damian Johnson <span dir="ltr"><<a href="mailto:atagar@torproject.org" target="_blank">atagar@torproject.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eric.<br>
<br>
> First, to clarify our github repository situation...<br>
<br>
gotcha<br>
<div class="im"><br>
> Next, in continuing work on the unit tests for proc.py, we ran into another issue with the mocking code.<br>
<br>
</div>Nice catch, though for your example (os.readlink) won't this make the<br>
tests platform dependent? Currently Beck (another volunteer working on<br>
stem) is working on making the tests run on Windows and it would be<br>
sad if we made his life harder. ;)<br>
<br>
Minor gity side note, there is almost no use case where you should be<br>
merging 'remotes/torproject/master' into your branch. Either rebase<br>
onto 'remotes/torproject/master' or make a new branch on<br>
'remotes/torproject/master' instead. That will make your dag (directed<br>
acyclic graph - the parent/child relationships between commits) far<br>
cleaner. Otherwise I need to cherry-pick rather than merge your work<br>
since merging would pull extra commits and confuse the master's dag.<br>
Let me know if you have any questions about this - admittedly without<br>
a whiteboard git can be a little confusing for new users.<br>
<br>
Cheers! -Damian<br>
</blockquote></div><br>