-
Notifications
You must be signed in to change notification settings - Fork 4
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
tests can change the current working directory #117
Comments
Hm yeah. If we go down that route then perhaps we should even It seems that the examples of |
@catch22, yes, the particular I would not want to go down that road and On a side note: I believe that the doctest switches will not be loved by many developers (there were some reactions on the Octave mailing list). In this case the |
@oheim It is in general not a good idea that tests rely on peculiarities of the host system (e.g., the presence of certain files). Therefore, code like I agree with your second point (and misremembered the implementation in my previous comment): I share the dislike for toggles and directives (see #127). Apart from |
Why is that needed in the first place? For testing of functions which are loaded from the current directory? Since the doctest_collect happens before the doctest_run: Would it be possible, to (1)
I could argue that you wouldn't even need XFAIL, because such documentation should either be SKIPed because it is not executable or corrected because it is wrong. Any counter examples? I find the SKIP switch useful for control of individual, not executable examples. The SKIP_IF switches are good for Octave-matlab incompatibilities or different OS behaviour. However if you have to use these, the incompatibilities are likely to affect a wide range of examples and then it becomes effortless to skip them all, because this spoils the idea of testing something. For example, in the interval package most examples don't work on Windows OS, because the documentation differs from the output due to missing UTF-8 support. |
So that you don't end up in I don't fully understand your second question. Note that
They have a different role: SKIP is for skipping examples that do not make sense to be executed (the Note that SKIP (as opposed to SKIP_IF/SKIP_UNLESS) is probably mostly needed in diary mode, since in texinfo you have the choice of using
I have a somewhat similar problem in quantbox. The style in https://github.com/catch22/quantbox/blob/master/sdp/solve_sdp.m#L36 helps to avoid excessive SKIP'ing but I can see that this does not scale. Let's collect some more data points.. |
At least in
Probably. I'd be fine with a |
For example, after
doctest cd
, we end up in${HOME}/octave
, because the example doescd ~/octave
.Perhaps we should reset the cwd after running tests. For now a workaround would be to mark such tests as
+SKIP
.The text was updated successfully, but these errors were encountered: