diff options
author | Mike Crute <mcrute@gmail.com> | 2015-12-05 20:01:38 -0800 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2015-12-05 20:01:38 -0800 |
commit | 9c29883778575ae5a340cb17f87f3369cbc22c43 (patch) | |
tree | 21d5dff7fa9645feb7bfc95c0dbe0346105635c7 /setup.py | |
parent | c034ffc37a98585bff189a6fd6f71b9d14c2c56f (diff) | |
download | pydora-9c29883778575ae5a340cb17f87f3369cbc22c43.tar.bz2 pydora-9c29883778575ae5a340cb17f87f3369cbc22c43.tar.xz pydora-9c29883778575ae5a340cb17f87f3369cbc22c43.zip |
Install requirements for tests
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -24,12 +24,25 @@ class SimpleCommand(Command): | |||
24 | def finalize_options(self): | 24 | def finalize_options(self): |
25 | pass | 25 | pass |
26 | 26 | ||
27 | def install_requires(self): | ||
28 | if self.distribution.install_requires: | ||
29 | self.distribution.fetch_build_eggs( | ||
30 | self.distribution.install_requires) | ||
31 | |||
32 | if self.distribution.tests_require: | ||
33 | self.distribution.fetch_build_eggs( | ||
34 | self.distribution.tests_require) | ||
35 | |||
36 | def run(self): | ||
37 | self.install_requires() | ||
38 | self._run() | ||
39 | |||
27 | 40 | ||
28 | class cover_test(SimpleCommand): | 41 | class cover_test(SimpleCommand): |
29 | 42 | ||
30 | description = "run unit tests with coverage" | 43 | description = "run unit tests with coverage" |
31 | 44 | ||
32 | def run(self): | 45 | def _run(self): |
33 | from coverage import coverage | 46 | from coverage import coverage |
34 | 47 | ||
35 | cov = coverage(data_file=".coverage", branch=True, | 48 | cov = coverage(data_file=".coverage", branch=True, |
@@ -50,7 +63,7 @@ class check_style(SimpleCommand): | |||
50 | 63 | ||
51 | description = "run PEP8 style validations" | 64 | description = "run PEP8 style validations" |
52 | 65 | ||
53 | def run(self): | 66 | def _run(self): |
54 | from pep8 import StyleGuide | 67 | from pep8 import StyleGuide |
55 | 68 | ||
56 | self.run_command("egg_info") | 69 | self.run_command("egg_info") |