blob: 9a42aacdd2e3d2963e8d5b9074e69a8aef139adf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
from modules.llvm import setup_test_suite
import os
from unittest import TestCase
from unittest.mock import MagicMock
class TestSetupTestSuite(TestCase):
def test_setup(self):
"""Test that we generate the right commands for setting up a sandbox."""
sandbox = "path/to/sandbox"
lnt = "path/to/lnt"
consumer = MagicMock()
setup_test_suite(consumer, sandbox, lnt)
firstCommand, directory = consumer.consume.call_args_list[0][0]
self.assertIsNone(directory)
self.assertEqual(
firstCommand,
["virtualenv", sandbox])
secondCommand, directory = consumer.consume.call_args_list[1][0]
self.assertIsNone(directory)
self.assertEqual(
secondCommand,
["{}/bin/python".format(sandbox),
"{}/setup.py".format(lnt),
"develop"])
|