Merge lp://qastaging/~coreygoldberg/selenium-simple-test/unified-testcase-runner into lp://qastaging/selenium-simple-test

Proposed by Corey Goldberg
Status: Merged
Approved by: Corey Goldberg
Approved revision: 374
Merged at revision: 353
Proposed branch: lp://qastaging/~coreygoldberg/selenium-simple-test/unified-testcase-runner
Merge into: lp://qastaging/selenium-simple-test
Diff against target: 261 lines (+151/-25)
8 files modified
ci.sh (+1/-1)
requirements.txt (+1/-0)
src/sst/runtests.py (+49/-21)
src/sst/selftests/test_go_to.py (+13/-0)
src/sst/selftests/test_testtools_testcase.py (+12/-0)
src/sst/selftests/test_two_methods.py (+11/-0)
src/sst/selftests/test_unittest_testcase.py (+9/-0)
src/sst/tests/test_sst_run.py (+55/-3)
To merge this branch: bzr merge lp://qastaging/~coreygoldberg/selenium-simple-test/unified-testcase-runner
Reviewer Review Type Date Requested Status
Corey Goldberg (community) Approve
Leo Arias (community) code review Approve
Review via email: mp+145643@code.qastaging.launchpad.net

Commit message

sst-run enhancements to run TestCase based test files.

Description of the change

unified runner with testCase identification.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

47 + """scan
Scan should start with upper-case.

Instead of
53 + V = ast.NodeVisitor()
I would write node_visitor = ast.NodeVisitor(). At least it should be start with lower-case,

200 +class SSTBrowserlessTestCase(runtests.SSTScriptTestCase):
Why don't you use the SSTBrowserlessTestCase defined in src/sst/tests/__init__.py?
To use this one for the SSTTestCase test is also weird, because it inherits from SSTScriptTestCase, so in the worst case you are testing the wrong thing. In the best case, it's confusing.

And the most important thing is that we are missing tests for get_case. That's not the fault of this branch, but as we are modifying its behavior, the right thing to do would be to add them.
What if we write a tmp file without classes, and assert that get_case returns a SSTScriptTestCase. And then write something with classes inside, and assert that it returns a SSTTestCase? I think that would be enough.

review: Needs Fixing (code review)
Revision history for this message
Leo Arias (elopio) wrote :

Also from IRC, why:

50 + found_classes = []
51 + def visit_class_def(node):
52 + found_classes.append(True)

instead of:
found_classes = False
def visit_class_def(node):
   found_classes = True

Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

I changed the test cases and what was being tested, fixed recommendations, and re-pushed.

Revision history for this message
Leo Arias (elopio) wrote :

Thanks Corey.

review: Approve (code review)
Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

few final fixes.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches