[gnome-keysign: 15/17] setup.py: Let python setup.py test run "nosetest tests"



commit 249435c7ed4c577afe2608caed36bd3d7a9ffb72
Author: Tobias Mueller <muelli cryptobitch de>
Date:   Fri Dec 15 13:33:39 2017 +0100

    setup.py: Let python setup.py test run "nosetest tests"
    
    I want python setup.py test to just work™.
    However, I also want to be able to call nosetest manually.
    Changing setup.cfg to include where=tests does not cut it,
    because then manually executing nosetest does not work anymore.
    Extending the command that's run seems to make both usecases work.

 setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/setup.py b/setup.py
index 935bef6..aa9ce18 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,7 @@ class NoseTestCommand(TestCommand):
     def run_tests(self):
         # Run nose ensuring that argv simulates running nosetests directly
         import nose
-        nose.run_exit(argv=['nosetests'])
+        nose.run_exit(argv=['nosetests' , 'tests'])
 
 
 setup(
@@ -185,4 +185,5 @@ setup(
             #'install': InstallWithCompile,
             'test': NoseTestCommand,
         },
+        # test_suite = 'nose.collector',
     )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]