Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into sy-faster-kraken-tests
- Loading branch information
Showing
100 changed files
with
2,843 additions
and
2,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
[run] | ||
branch = True | ||
omit = tools/conda-tools/* | ||
disable_warnings = | ||
module-not-imported | ||
|
||
[report] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import sys | ||
import time | ||
import pytest | ||
import operator | ||
|
||
|
||
def timer(): | ||
if sys.version_info < (3, 3): | ||
return time.time() | ||
return time.perf_counter() | ||
|
||
|
||
def pytest_addoption(parser): | ||
group = parser.getgroup("terminal reporting", "reporting", after="general") | ||
group.addoption( | ||
'--fixture-durations', | ||
action="store", | ||
type=int, | ||
default=None, | ||
metavar="N", | ||
help="show N slowest fixture durations (N=0 for all)." | ||
), | ||
|
||
|
||
def pytest_configure(config): | ||
reporter = FixtureReporter(config) | ||
config.pluginmanager.register(reporter, 'fixturereporter') | ||
|
||
|
||
class FixtureReporter: | ||
|
||
def __init__(self, config): | ||
import _pytest.config | ||
self.config = config | ||
self.stats = {} | ||
self.writer = _pytest.config.create_terminal_writer(config) | ||
self.durations = config.option.fixture_durations | ||
|
||
@pytest.hookimpl(hookwrapper=True) | ||
def pytest_fixture_setup(self, fixturedef, request): | ||
funcname = request._pyfuncitem.name | ||
fixname = fixturedef.argname | ||
|
||
fixturedef._timer_start = timer() | ||
yield | ||
duration = timer() - fixturedef._timer_start | ||
fixturedef._timer_duration = duration | ||
|
||
self.stats[(fixname, funcname)] = duration | ||
|
||
def pytest_terminal_summary(self, terminalreporter, exitstatus): | ||
if self.durations is None: | ||
return | ||
|
||
writer = terminalreporter.writer | ||
|
||
slowest = sorted(self.stats.items(), key=operator.itemgetter(1), reverse=True) | ||
if not self.durations: | ||
writer.sep("=", "slowest fixture durations") | ||
else: | ||
writer.sep("=", "slowest %s fixture durations" % self.durations) | ||
slowest = slowest[:self.durations] | ||
|
||
|
||
rows = [] | ||
for (fixname, funcname), duration in slowest: | ||
row = ['{:.2f}s'.format(duration), fixname, funcname] | ||
rows.append(row) | ||
|
||
widths = [max(map(len, col)) for col in zip(*rows)] | ||
for row in rows: | ||
writer.write(" ".join((val.ljust(width) for val, width in zip(row, widths)))) | ||
writer.line() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
easy-deploy-virtualized/.vagrant/machines/default/aws/action_provision
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
easy-deploy-virtualized/.vagrant/machines/default/aws/creator_uid
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
easy-deploy-virtualized/.vagrant/machines/default/aws/index_uuid
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
easy-deploy-virtualized/.vagrant/machines/default/aws/synced_folders
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
easy-deploy-virtualized/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.