Achtung:
Problem: In PyCharm, when deciding a path in a py file, use os.getcwd()
to get current working directory, it’s highly likely that cwd is not the directory where current file is in.
Why ?
Because “working directory” would be set inside Edit Configurations
which would be shown if Run
was executed, on the top.
A small issue can cost an hour.
Also, for a repo to function normally, the most important two things would be in File>Settings>Project>Project Intepreter
and File>Settings>Tools>Python Integrated Tools
for testing purpose.
pytest nowadays usually outperform unit test, like with
usually beats classic open
files.
Machine: Ubuntu 16.04; CentOS 7