Win7, Python 3.6.2
If I run a unit test with the following embedded:
print('realpath =', os.path.realpath('test_main.py'))
I get the following in my test output (Only relevant line is shown):
Ensure expected list of string integers is returned. ... realpath =
c:\Projects\solitaire_scorekeeper\test_main.py
In actuality "test_main.py" is located at
"c:\Projects\solitaire_scorekeeper\tests\test_main.py"
If I open the interpreter from the directory
"c:\Projects\solitaire_scorekeeper\tests\" I get what I expect:
py3: import os.path
py3: os.path.realpath('test_main.py')
'c:\\Projects\\solitaire_scorekeeper\\tests\\test_main.py'
Would someone enlighten me as to why the different results?
TIA!
--
boB
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor