Closed csemken closed 4 years ago
Great! Please move into a tests
subdirectory, and rebase on #14 when merged (as of now the test rightfully fails).
Great! Please move into a
tests
subdirectory, and rebase on #14 when merged (as of now the test rightfully fails).
Done.
Done.
Thanks... but the script should be named differently, as it can't import stargazer
if it's called stargazer.py
itself. You can use run_test.py
.
In general, when pushing tests, please check that they do run ;-)
Thanks... but the script should be named differently, as it can't import
stargazer
if it's calledstargazer.py
itself. You can userun_test.py
.
Apologies. I typically use test_module.py
for module.py
and forgot the test
part. But I renamed to run_test.py
as you suggested.
In general, when pushing tests, please check that they do run ;-)
I did. It runs perfectly if you use the root folder as the working directory. But I understand not everyone has the same setup. I hope it works now! ;-)
I did. It runs perfectly if you use the root folder as the working directory. But I understand not everyone has the same setup. I hope it works now! ;-)
Then something else is different here...
pietro@debiousci:~/nobackup/repo/stargazer$ python3 tests/stargazer.py
Traceback (most recent call last):
File "tests/stargazer.py", line 6, in <module>
from stargazer.stargazer import Stargazer, LineLocation
File "/home/nobackup/repo/stargazer/tests/stargazer.py", line 6, in <module>
from stargazer.stargazer import Stargazer, LineLocation
ModuleNotFoundError: No module named 'stargazer.stargazer'; 'stargazer' is not a package
Anyway, it works fine after the last change, so I'm proud to having (finally) merged the first test for stargazer!
Thanks @csemken !
Create a test file, partially fixing #43. Tests the
add_line
method API, as agreed upon in #14.