Q:

Why is the compileall module not working?

I'm testing compiling Python code, but when I run the compileall module on a directory with a test file in it, it skips the directory and goes and compiles the Standard Library for some reason. Why is it doing this?

A:

You're running python -m compileall without specifying a directory, and the module is doing exactly what the documentation says it should: compiling every directory in sys.path.
To compile only the directory you're currently in, pass it on the command line:
$ python -m compileall .

