You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since both pypreprocessor and pytest are doing things under the hood and are based on conflicting assumptions, it is hard to get them to work together. For example, to ensure that pypreprocessor is run before pytest, pypreprocessor is enforced by replacing all names with "test" with "txst" and then replace all occurrences of "txst" with "test" and then run pytest.
Also, to get a pypreprocessor specified file to work as part of a test case, it is necessary to do something like "sys.argv = sys.argv[1:]" since pypreprocessor assumes things about sys.argv that is not true when it is invoked under pytest (e.g., sys.argv[1] is not pointing to the pypreprocessed-augmented file, but to the script invoking it.
I have workarounds and got it to work for my own private purpose, but to make pypreprocessor useful together with pytest, they must be more compatible.
The text was updated successfully, but these errors were encountered:
Since both pypreprocessor and pytest are doing things under the hood and are based on conflicting assumptions, it is hard to get them to work together. For example, to ensure that pypreprocessor is run before pytest, pypreprocessor is enforced by replacing all names with "test" with "txst" and then replace all occurrences of "txst" with "test" and then run pytest.
Also, to get a pypreprocessor specified file to work as part of a test case, it is necessary to do something like "sys.argv = sys.argv[1:]" since pypreprocessor assumes things about sys.argv that is not true when it is invoked under pytest (e.g., sys.argv[1] is not pointing to the pypreprocessed-augmented file, but to the script invoking it.
I have workarounds and got it to work for my own private purpose, but to make pypreprocessor useful together with pytest, they must be more compatible.
The text was updated successfully, but these errors were encountered: