Author: adc Date: Sat Aug 30 16:38:07 2014 New Revision: 1621490 URL: http://svn.apache.org/r1621490 Log: Committers are no longer cached - test speed up
Modified: labs/panopticon/pan-utils/tests/test_podlings.py Modified: labs/panopticon/pan-utils/tests/test_podlings.py URL: http://svn.apache.org/viewvc/labs/panopticon/pan-utils/tests/test_podlings.py?rev=1621490&r1=1621489&r2=1621490&view=diff ============================================================================== --- labs/panopticon/pan-utils/tests/test_podlings.py (original) +++ labs/panopticon/pan-utils/tests/test_podlings.py Sat Aug 30 16:38:07 2014 @@ -7,7 +7,7 @@ # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an @@ -34,6 +34,7 @@ def test_from_xml(username, password): assert podlings assert len(podlings) == 184 + committers = {} for podling in podlings: assert podling.name assert podling.description @@ -44,11 +45,14 @@ def test_from_xml(username, password): assert podling.status in VALID_STATUS assert not podling.reporting_group or isinstance(podling.reporting_group, int) for mentor in podling.mentors: - try: - committer = get_committer(mentor, username, password) - print committer.fullname, 'is a committer' - except KeyError: - print mentor, 'is not a committer' + if mentor not in committers: + try: + committer = get_committer(mentor, username, password) + print committer.fullname, 'is a committer' + committers[mentor] = True + except KeyError: + print mentor, 'is not a committer' + committers[mentor] = False assert len(incubating(podlings)) == 34 assert len(graduated(podlings)) == 118 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@labs.apache.org For additional commands, e-mail: commits-h...@labs.apache.org