mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
formatting updates
This commit is contained in:
parent
3385f2d675
commit
1129de0beb
11 changed files with 153 additions and 128 deletions
|
|
@ -18,7 +18,7 @@ def test_next_id_overflow():
|
|||
|
||||
def test_next_id_random():
|
||||
for i in range(1000):
|
||||
prev_id = str(random.randint(1, 100000))
|
||||
prev_id = str(random.randint(1, 100_000))
|
||||
try:
|
||||
next_id = lex_id.next_id(prev_id)
|
||||
assert prev_id < next_id
|
||||
|
|
@ -27,10 +27,10 @@ def test_next_id_random():
|
|||
|
||||
|
||||
def test_ord_val():
|
||||
assert lex_id.ord_val("1") == 1
|
||||
assert lex_id.ord_val("01") == 1
|
||||
assert lex_id.ord_val("02") == 2
|
||||
assert lex_id.ord_val("09") == 9
|
||||
assert lex_id.ord_val("1" ) == 1
|
||||
assert lex_id.ord_val("01" ) == 1
|
||||
assert lex_id.ord_val("02" ) == 2
|
||||
assert lex_id.ord_val("09" ) == 9
|
||||
assert lex_id.ord_val("110") == 10
|
||||
|
||||
|
||||
|
|
@ -39,13 +39,13 @@ def test_main(capsys):
|
|||
captured = capsys.readouterr()
|
||||
assert len(captured.err) == 0
|
||||
|
||||
lines = iter(captured.out.splitlines())
|
||||
lines = iter(captured.out.splitlines())
|
||||
header = next(lines)
|
||||
|
||||
assert "lexical" in header
|
||||
assert "numerical" in header
|
||||
|
||||
ids = []
|
||||
ids = []
|
||||
ord_vals = []
|
||||
|
||||
for line in lines:
|
||||
|
|
@ -60,5 +60,5 @@ def test_main(capsys):
|
|||
ord_vals.append(int(_ord_val.strip()))
|
||||
|
||||
assert len(ids) > 0
|
||||
assert sorted(ids) == ids
|
||||
assert sorted(ids ) == ids
|
||||
assert sorted(ord_vals) == ord_vals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue