Skip to content

Commit c0a33b3

Browse files
committed
Add test for integral --build-memory-limit
1 parent 24eb3f9 commit c0a33b3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/unit/test_args.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ def test_dry_run():
4040
assert not r2d.run
4141
assert not r2d.push
4242

43+
44+
def test_mem_limit():
45+
"""
46+
Test various ways of passing --build-memory-limit
47+
"""
48+
r2d = make_r2d(['--build-memory-limit', '1024', '.'])
49+
assert int(r2d.build_memory_limit) == 1024
50+
51+
r2d = make_r2d(['--build-memory-limit', '3K', '.'])
52+
assert int(r2d.build_memory_limit) == 1024 * 3
53+
4354
def test_run_required():
4455
"""
4556
Test all the things that should fail if we pass in --no-run

0 commit comments

Comments
 (0)