-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test breakage in core/test/exporters #57
Comments
Could you try running tests again after it failed with the AssertionError on the last line? I see this error a lot and haven't fixed it, but it always (often?) seems to go away after the first time I run the tests The exporter tests are all sketchy self-modifying code tests, so running them is not idempotent and can potentially delete your entire source tree if they do the wrong thing (I've already done that once...). It would be great if they didn't do that, but until we have a good virtual filesystem I can test my exported code in, that's gonna be pretty hard. |
Updated the original description, since I copied the wrong traceback there. Running the test twice results in the following errors (on my branch with path fixes):
Since I'm not sure what the exporters are for and how they should work, I'll leave this last AssertionError alone for now. But should I do a pull request for the file paths error? Re: virtual filesystem - perhaps that complexity could be avoided by using a mocked "filesystem"? |
tl, dr: exporters are used to do stuff with your code as it gets macro expanded, either dumping it in some separate folder to use later, or caching it as https://github.com/lihaoyi/macropy#exporting-your-expanded-code Those tests are testing the save-macro-expanded-code-as-.pyc functionality:
I'm not sure exactly what's causing those errors, but one possibility is someone is (by default) saving your compiled code in Re: virtual filesystem: these tests involve actually running code to see how the exporters play with the filesystem (e.g. saving pre-compiled You can send a PR for the file paths problem first. What exactly was the problem in your case? Does your OS have different path-separators or something? Thanks for all the effort you're putting in =) |
No, but paths in style
Glad to be of use. :) |
I'm seeing this issue as well, could you merge the pull request? |
The tests under core/test/exporters/init.py fail for me under python2.7.
test_save_exporter
can be fixed by properly using the os.path module get parent directory path. This is outlined in the following commit: macobo@543bc63Even after that
test_pyc_exporter
fails for me with an AssertionError on the last line.The text was updated successfully, but these errors were encountered: