Closed nicolasdlss closed 2 years ago
Is already possible for all 'fast' tests (all tests except Fluent, Abaqus, OpenFOAM and Kratos). Can be done by doing the setup and changing the working directory path similar to the Python solver wrappers.
Has been done for the Fluent tests.
@nicolasdlss kratos and openfoam tests have this capability.
I see that you can indeed run them from their folder. But, I was also talking about using the green arrows in PyCharm or running the file from anywhere. It's not a necessary feature and not at all urgent, but its also not that much work. I just thought it would be nice (as is now the case for Fluent and the Pycharm solvers), but we can discuss this later.
Has been done for the OpenFOAM tests (#123 ).
Closed by #181
Currently, it is not possible to run an individual solver wrapper tests (for Fluent and Abaqus) from the file itself, because the paths are configured to run from the
tests
directory. Nonetheless, this would be a nice option. By modifying some paths this will be possible.These Python commands are useful in that regard:
os.path.dirname(__file__)
this method returns a string value which represents the directory name from the specified pathos.path.realpath()
eliminating any symbolic links encountered in the pathos.getcwd()
this method returns current working directory of a processAlternatively, this command can be used
os.chdir(tmp_example_path)
to change the path from where the files are run (similar tocd
in the terminal).