def test_get_j_arg_live(self): localbuild = Localbuild([]) # Rather than calculating the amount of RAM on this system and # basically re-implementing the entire code here to get the exact # expected result, just pattern-match for basic sanity. result = localbuild._get_j_arg(cpus=1) assert re.match(r'-j\d+$', result)
def test_get_j_arg_live(self): localbuild = Localbuild([]) # Rather than calculating the amount of RAM on this system and # basically re-implementing the entire code here to get the exact # expected result, just pattern-match for basic sanity. result = localbuild._get_j_arg(cpus=1) assert re.match('-j\d+$', result)
def test_get_j_arg(self, cpus, ram, expected): localbuild = Localbuild([]) result = localbuild._get_j_arg(cpus=cpus, total_ram_gb=ram) assert result == expected
def test_get_j_arg(self, cpus, ram, expected, monkeypatch): monkeypatch.setenv('HOME', FIXTURES_DIR) localbuild = Localbuild(()) result = localbuild._get_j_arg(cpus=cpus, total_ram_gb=ram) assert result == expected