saltstack/salt — pull request #5585 by zhangcheng (2013-06-17 15:46:38+00:00)
Title: Make it possible to run a single unit test

Before, command like `./tests/runtests.py -u -n unit.modules.pip_test -vv` won't work, since it will start to run integration suite.

```
$ ./tests/runtests.py -u -n unit.modules.pip_test -vv
Logging tests on /tmp/salt-runtests.log
Current Directory: /salt-src
Test suite is running under PID 10098
Setting up Salt daemons to execute tests
15:19:53,951 [salt.crypt:102 ][INFO ] Generating keys: /tmp/salttest/pki
15:19:56,129 [salt.master:120 ][INFO ] Preparing the vagrant key for local communication
15:19:56,130 [salt.master:120 ][INFO ] Preparing the root key for local communication
15:19:56,302 [salt.master :304 ][INFO ] salt-master is starting as user 'vagrant'
...
```

After this fix,
```
$ ./tests/runtests.py -u -n unit.modules.pip_test -vv
Logging tests on /tmp/salt-runtests.log
Current Directory: /salt-src
Test suite is running under PID 10510
Starting unit.modules.pip_test Tests
test_cached_requirements_used (unit.modules.pip_test.PipTestCase) ... ok
test_failed_cached_requirements (unit.modules.pip_test.PipTestCase) ... ok
test_fix4361 (unit.modules.pip_test.PipTestCase) ... ok
test_fix_activate_env (unit.modules.pip_test.PipTestCase) ... ok

----------------------------------------------------------------------
Ran 4 tests in 0.009s

OK
```