Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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
Пример #4
0
 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
Пример #5
0
 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