wrong indent after adding entrypoint tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pythoscope |
Fix Released
|
Medium
|
Michal Kwiatkowski |
Bug Description
working through the tutorial/
first I generated tests without entrypoints, works fine
second I add entrypoints and generate tests again
result: tests are appended as described in tutorial but first
``def`` line of test method is missing the intendation
after manually intending it, generated test are as described an work
correctly.
example:
class TestOldPython(
def test_hiss(self):
assert False # TODO: implement your test here
def test_object_
assert False # TODO: implement your test here
def test_creation_
def test_hiss_
old_python = OldPython(age=65)
PS: comment on tutorial
since I'm running the tests from outside the project, I had to add the package name to the
import in the entry points, e.g.
from testproj.old_nest import OldNest
otherwise I get import errors when runnng tests.
Related branches
Changed in pythoscope: | |
milestone: | dynamic-analysis → dynamic-analysis-fixes |
I stumbled unto this bug once or twice, but after further inspection I couldn't reproduce it. It seemed to appear only when appending to new test classes generated by the Pythoscope itself. Those are kept pickled the way they were generated. If you force reparsing of the test file (e.g. by touching it) Pythoscope will be able to append new test cases just right. The bug is most likely inside the store.py: TestClass. _append_ test_case_ code method.