Completed
Push — master ( da3b73...3279ec )
by Kenny
01:17
created

TestPlumd.initialize_options()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 4
rs 10
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
"""
5
test_plumd
6
----------------------------------
7
8
Tests for `plumd` module.
9
"""
10
11
from setuptools.command.test import test as TestCommand
12
import sys
13
14
15
class TestPlumd(TestCommand):
16
    """Unit tests currently broken/not created. todo."""
17
    user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
18
19
    def initialize_options(self):
20
        """Broken. todo."""
21
        TestCommand.initialize_options(self)
22
        self.tox_args = None
23
24
    def finalize_options(self):
25
        """Broken. todo."""
26
        TestCommand.finalize_options(self)
27
        self.test_args = []
28
        self.test_suite = True
29
30
    def run_tests(self):
31
        """Broken. todo."""
32
        #import here, cause outside the eggs aren't loaded
33
        import tox
34
        import shlex
35
        args = self.tox_args
36
        if args:
37
            args = shlex.split(self.tox_args)
38
        errno = tox.cmdline(args=args)
39
        sys.exit(errno)
40
41
42
if __name__ == '__main__':
43
    import sys
44
    sys.exit(unittest.main())
45