Skip to content

Commit

Permalink
- fixed setup.py test so that it only finds and executes netaddr tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drkjam committed Jun 22, 2015
1 parent 328bdcd commit ba276fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Expand Up @@ -27,9 +27,16 @@ def finalize_options(self):
def run(self):
import subprocess
import sys
errno = subprocess.call([sys.executable, 'runtests.py'])
import os
saved_cwd = os.getcwd()
try:
os.chdir(os.path.join(os.path.dirname(__file__), 'test'))
errno = subprocess.call([sys.executable, '../runtests.py'])
finally:
os.chdir(saved_cwd)
raise SystemExit(errno)


def main():
if sys.version_info[:2] < (2, 4):
sys.stderr.write("netaddr requires Python version 2.4 or higher.\n")
Expand Down

0 comments on commit ba276fb

Please sign in to comment.