-
Notifications
You must be signed in to change notification settings - Fork 34
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
Don't rely on fs_extra #65
Comments
tag @GearBoxFox |
I don't think i can assign unless you're participating in this issue. |
Noting this as unassigned. |
Are you looking for a custom Also do you want to keep the error codes of Note: I sent you a friend request on Discord. |
IIRC we're only using copy_dir to copy a mock project (from resources dir) into a tempdir for tests. We don't need all the configuration or error handling. Just copy all contents from here to here. But... I don't really want to do this for testing in the future. I'm hoping we can just hardcode tests as needed. As an example, if I want to test the fmt operations we can just hardcode an unformatted python function, serialize it to the tempdir, run, and then assert. #[test]
fn test_fmt() {
let py = r#"""\
def some_fn(
):
pass
"""#;
write(py, dir.join("mock.py"));
let res = read(dir.join("mock.py"));
let ans = r#"""\
def some_fn():
pass
"""#;
assert_eq!(res, ans);
} I might be missing some edge cases. So we probably should wait to do this, but you get my point hopefully. At that point we should be able to rip copy_dir out altogether. |
Also we have a discord if you want to join that https://discord.gg/St3menxFZT |
Instead of using fs_extra to copy mock directories to tempdirs for testing, we can just create our own dir copying function.
Add to huak::utils::path a function
copy_dir
to copy one directory into another target dir.The text was updated successfully, but these errors were encountered: