I hereby claim:
- I am pelme on github.
- I am pelme (https://keybase.io/pelme) on keybase.
- I have a public key whose fingerprint is 952E B53A E6DB 09C0 E414 76E1 D7F2 54C4 0A16 7777
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # jj-github-pr: Create Github PRs from jujutsu changes | |
| # Each change will be one PR. Relations between changes will be preserved by setting the PR base branch. | |
| # The commit title/message will be used for the PR title/body. | |
| # The command can be used multiple times to update the stack of PRs, titles and commits. | |
| # A "Relation chain" which shows the relation between the submitted PRs will be added to the PR body. | |
| # Usage: Run jj-github-pr <revision> to submit each jj change as a PR. | |
| # | |
| # Example usage: |
| # -*- coding: utf-8 -* | |
| from __future__ import print_function, division, absolute_import | |
| import click | |
| import copy | |
| import os | |
| import subprocess | |
| import functools | |
| import dj_database_url |
| # -*- coding: utf-8 -* | |
| from __future__ import print_function, division, absolute_import, unicode_literals | |
| import hashlib | |
| import inspect | |
| def main(): | |
| import django | |
| django.setup() |
I hereby claim:
To claim this, I am signing this object:
| The quiet output does not show test execution times: | |
| $ py.test -m 'not django_db' -q | |
| .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |
| import pytest | |
| from contextlib import contextmanager | |
| from functools import wraps | |
| # TODO: Make it possible to pass standard pytest.fixture args here too, like scope, params etc.. | |
| def pytest_contextfixture(fn): | |
| ctxmgr = contextmanager(fn) | |
| @pytest.fixture | |
| @wraps(fn) |
| from mock import patch | |
| from contextlib import contextmanager | |
| def _patch_method(obj, method_name, return_value=DEFAULT, **kwargs): | |
| # Allow specifying a dotted string instead of an object | |
| if isinstance(obj, basestring): | |
| return patch('%s.%s' % (obj, method_name), autospec=True, return_value=return_value, **kwargs) | |
| kwargs['autospec'] = True |
| #!/bin/bash | |
| SOURCE_DIR=$1 | |
| TARGET_DIR=$2 | |
| SOURCE_DIR_FULL=$(grealpath $SOURCE_DIR) | |
| TARGET_DIR_FULL=$(grealpath $TARGET_DIR) | |
| cd $SOURCE_DIR |