-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f314cc
commit c49faf6
Showing
6 changed files
with
1,573 additions
and
0 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
target/ | ||
result/ | ||
__pycache__/ | ||
|
||
scratch | ||
|
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,42 @@ | ||
from pathlib import Path | ||
import subprocess | ||
|
||
from pyln.testing.fixtures import * # noqa: F401,F403 | ||
from pyln.testing.utils import BITCOIND_CONFIG, TailableProc | ||
|
||
SMAUG_PLUGIN = Path("~/.cargo/bin/smaug").expanduser() | ||
|
||
|
||
def write_toml_config(filename, opts): | ||
with open(filename, "w") as f: | ||
for k, v in opts.items(): | ||
if isinstance(v, str): | ||
f.write('{} = "{}"\n'.format(k, v)) | ||
else: | ||
f.write("{} = {}\n".format(k, v)) | ||
|
||
@pytest.hookimpl(tryfirst=True, hookwrapper=True) | ||
def pytest_runtest_makereport(item, call): | ||
# execute all other hooks to obtain the report object | ||
outcome = yield | ||
rep = outcome.get_result() | ||
|
||
# set a report attribute for each phase of a call, which can | ||
# be "setup", "call", "teardown" | ||
|
||
setattr(item, "rep_" + rep.when, rep) | ||
|
||
|
||
def pytest_configure(config): | ||
config.addinivalue_line("markers", "developer: only run when developer is flagged on") | ||
|
||
|
||
def pytest_runtest_setup(item): | ||
for mark in item.iter_markers(name="developer"): | ||
pass | ||
|
||
|
||
@pytest.fixture(scope="function", autouse=True) | ||
def log_name(request): | ||
# Here logging is used, you can use whatever you want to use for logs | ||
logging.info("Starting '{}'".format(request.node.name)) |
Oops, something went wrong.