-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest_unit_e_substitutions.py
35 lines (29 loc) · 1.1 KB
/
test_unit_e_substitutions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright (c) 2019 The Unit-e developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/licenses/MIT.
# Regression tests for clonemachine, checks against known good substitutions
#
# Run it with `pytest -v test_unit_e_substitutions.py`
import pytest
from runner import Runner
@pytest.fixture
def runner():
"""Set up git checkout for test and return a runner to run operations
on it.
"""
runner = Runner("unit-e")
runner.checkout_unit_e_clone()
runner.fetch_bitcoin()
return runner
def test_urls(runner):
runner.apply_diff("naming")
runner.run_clonemachine("substitute-unit-e-urls")
runner.commit("Ran clonemachine.py substitute-unit-e-urls")
runner.write_diff("urls")
assert runner.compare_latest_diffs("urls") == ""
def test_executables(runner):
runner.apply_diff("urls")
runner.run_clonemachine("substitute-unit-e-executables")
runner.commit("Ran clonemachine.py substitute-unit-e-executables")
runner.write_diff("executables")
assert runner.compare_latest_diffs("executables") == ""