Skip to content

Refactor test_pr.py#2142

Merged
takluyver merged 3 commits into
ipython:masterfrom
takluyver:testpr-oo
Jul 18, 2012
Merged

Refactor test_pr.py#2142
takluyver merged 3 commits into
ipython:masterfrom
takluyver:testpr-oo

Conversation

@takluyver

Copy link
Copy Markdown
Member

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.

@takluyver

Copy link
Copy Markdown
Member Author

I've also dropped Python 3.1, as we're not supporting it for 0.14.

@Carreau

Carreau commented Jul 16, 2012

Copy link
Copy Markdown
Member

We can drop gh-api v2 which is dead, it's a shame because I can't use requests without ghapi v2 from work...

@takluyver

Copy link
Copy Markdown
Member Author

Good point, I hadn't even noticed that code.

@takluyver

Copy link
Copy Markdown
Member Author

Test results for commit 26fdbf6 merged into master
Platform: linux2

  • python2.7: OK (libraries not available: oct2py pymongo tornado wx wx.aui)
  • python3.2: OK (libraries not available: oct2py pymongo wx wx.aui)

Not available for testing: python2.6

@bfroehle

Copy link
Copy Markdown
Contributor

Should we also add python3.3 as a valid target? I suspect some of us have the beta installed.

@takluyver

Copy link
Copy Markdown
Member Author

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.

Comment thread tools/test_pr.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feel like it should be a @classmethod instead of @staticmethod, in case one was to subclass TestRun.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't pre-emptively set __class__ - that could have all sorts of unexpected effects.

@bfroehle

Copy link
Copy Markdown
Contributor

I've tested a few times and haven't run into any issues. Seems ready to me.

@takluyver

Copy link
Copy Markdown
Member Author

Great, thanks for the review. I'll merge this now, then.

takluyver added a commit that referenced this pull request Jul 18, 2012
@takluyver takluyver merged commit c24a8c1 into ipython:master Jul 18, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants