Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed Jul 10, 2024
1 parent b0a3411 commit df7c575
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
5 changes: 1 addition & 4 deletions docs/run.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Options
Show help message and exit.

``-C --initial_cycle <int>``
Cycle to start payment(s) from. Valid range: ``[-1,)``. Default value: ``-1`` (pay rewards that were most recently released). Cycle for which rewards were most recently released is calculated based on the formula: ``current_cycle - 1 + [if --adjusted_payout_timing == True: (preserved_cycles + 1)]``.
Cycle to start payment(s) from. Valid range: ``[-1,)``. Default value: ``-1`` (pay rewards that were most recently released). Cycle for which rewards were most recently released is calculated based on the formula: ``current_cycle - 1``.

``-M --run_mode <int>``
Waiting decision after making pending payments. Valid range: ``[1,4]``. Default value: ``1``. Values description:
Expand All @@ -29,9 +29,6 @@ Options
3. Run for one cycle and exit. Suitable to use with ``-C`` option.
4. Retry failed payments and exit.

``--adjusted_early_payouts``
If provided allows for early, later on adjusted payouts for cycle = current_cycle - 1 + (preserved_cycles + 1). Its default value is ``False`` if not provided as argument. See :ref:`payout_timing`.

``-O --payment_offset <int>``
Number of blocks to wait after a cycle starts before starting payments. This can be useful because cycle beginnings may be busy.

Expand Down
2 changes: 2 additions & 0 deletions tests/regression/test_level_in_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def test_levels_in_cycle():
[3000000, 1727],
[3268609, 0], # Mumbai activation level
[3333796, 16035],
[5726209, 0], # Paris activation level
[5898888, 647],
]

block = DummyApiImpl()
Expand Down
20 changes: 0 additions & 20 deletions tests/unit/test_args_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,25 +123,6 @@ def test_initial_cycle_validator_throws(caplog, capsys):
)


def test_adjusted_early_payouts_validator_throws(capsys):
argparser = argparse.ArgumentParser()
argparser.add_argument(
"--adjusted_early_payouts",
default=1,
type=int,
)
mock_validator = ArgsValidator(argparser)
with pytest.raises(SystemExit) as pytest_wrapped_e:
mock_validator._adjusted_early_payouts_validator()
out, err = capsys.readouterr()
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 2
assert (
"adjusted_early_payouts must be True or False. Its default value is False if not provided as argument."
in err
)


def test_base_directory_validator():
argparser = argparse.ArgumentParser()
argparser.add_argument("--base_directory", default="~/TEST_DIR")
Expand All @@ -167,7 +148,6 @@ def test_validate():
assert SUT == argparse.Namespace(
initial_cycle=-1,
run_mode=1,
adjusted_early_payouts=False,
payment_offset=0,
network="MAINNET",
node_endpoint="http://127.0.0.1:8732",
Expand Down

0 comments on commit df7c575

Please sign in to comment.