Refactor test_pr.py#2142
Conversation
|
I've also dropped Python 3.1, as we're not supporting it for 0.14. |
|
We can drop gh-api v2 which is dead, it's a shame because I can't use requests without ghapi v2 from work... |
|
Good point, I hadn't even noticed that code. |
|
Test results for commit 26fdbf6 merged into master
Not available for testing: python2.6 |
|
Should we also add |
|
Last time I tried, virtualenv and pip were still causing some problems with 3.3, so it needed manual tweaking to work. I'll give it another go later. |
There was a problem hiding this comment.
This feel like it should be a @classmethod instead of @staticmethod, in case one was to subclass TestRun.
There was a problem hiding this comment.
Would that change anything? It will simply load whatever's been pickled. It could be a top level function, but I wanted to keep it alongside dump_results.
There was a problem hiding this comment.
I guess I meant something like:
@classmethod
def load_results(cls):
with open(os.path.join(basedir, 'lastresults.pkl'), 'rb') as f:
obj = pickle.load(f)
obj.__class__ = cls
But this is totally unnecessary, so let's skip it.
There was a problem hiding this comment.
I wouldn't pre-emptively set __class__ - that could have all sorts of unexpected effects.
|
I've tested a few times and haven't run into any issues. Seems ready to me. |
|
Great, thanks for the review. I'll merge this now, then. |
Refactor test_pr.py
Refactored the PR test framework into a main TestRun class, which should be more maintainable than the set of parameters & global variables used before.
Tested on #2140 (passing) and #2141(failing).
I'll merge this tomorrow unless anyone objects.