By comparing `sys.path` as setup by nose vs. testall.py it seems that we
weren't adding the top-level beets directory to the path. The script was
also previously changing the working directory before running the tests.
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
This was added in 1666f883e3 back in 2013. I'm
not sure why this *ever* worked to get beetsplug to point to the right
directory, but I believe it was superseded by the path manipulation in
aa07eb9551, added in 2014. And now, it's causing
problems on Windows, where for some reason it's causing `import beetsplug.x`
to silently succeed but yield an empty `beetsplug`, without `x` in the
namespace.
This reverts commit 9c41c39913.
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.
Goal is smoothing the transition to python 3.