Please merge the branch #64

Closed
wants to merge 8 commits into
from

Conversation

Projects
None yet
4 participants

Chris, Marco thinks the whole branch needs integrating.

Collaborator

marcofalcioni commented on 71ec1e5 Mar 22, 2012

Hi Charlie, how do I get a hold of you?

@marcofalcioni marcofalcioni Using os.path for path manipulation in both tests and code.
This ensures that tests can run on Windows as well as Unix.
dd1ad81

@mmerickel mmerickel commented on the diff Jun 24, 2013

pyramid_debugtoolbar/panels/tests/test_sqla.py
+ def _makeOne(self):
+ from pyramid_debugtoolbar.panels.sqla import _after_cursor_execute
+ _after_cursor_execute(DummyConnection(), None, None, None, None, None)
+
+ def test_no_max_queries(self):
+ self._makeOne()
+ self.assertEqual(self.request.registry.settings.get(
+ 'debugtoolbar.sqla_max_queries'), None)
+ self.assertEqual(self.request.pdtb_sqla_queries.maxlen, None)
+
+ def test_max_queries(self):
+ self.request.registry.settings['debugtoolbar.sqla_max_queries'] = '10'
+ self.assertEqual(self.request.registry.settings.get(
+ 'debugtoolbar.sqla_max_queries'), '10')
+ self._makeOne()
+ self.assertEqual(self.request.pdtb_sqla_queries.maxlen, 10)
@mmerickel

mmerickel Jun 24, 2013

Owner

This should fail on Python 2.6. The maxlen property on a deque was not introduced until 2.7 (same with line 50 above). Maybe just perform a bunch of queries and ensure the length is still only 10.

Contributor

brodul commented Aug 17, 2013

I looked at that pull request. The test fails if I checkout into the pull requests branch.
Will try to make it merge to the master.

Owner

mmerickel commented Dec 23, 2014

It's been a year and a lot has changed unfortunately. If anyone would like to bring this back up to date with master then please submit a new PR. I think the changes proposed here are still valid.

mmerickel closed this Dec 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment