Browse Source

nose tests for both py2 and py3

boyska 4 years ago
parent
commit
a14771797c
3 changed files with 10 additions and 6 deletions
  1. 5 0
      README.md
  2. 1 1
      server/test_forge.py
  3. 4 5
      setup.py

+ 5 - 0
README.md

@@ -47,3 +47,8 @@ The encoding part is delegated to `ffmpeg`, but the code is really modular so
 changing this is a breeze. To be quicker and avoid the quality issues related
 to reencoding, the codec "copy" is used: this means that input and output must
 have the same format.
+
+testing
+-----------
+
+unit tests can be run with `python setup.py test`

+ 1 - 1
server/test_forge.py

@@ -2,7 +2,7 @@ from datetime import datetime, timedelta
 
 from nose.tools import raises, eq_
 
-from forge import get_files_and_intervals, get_timefile_exact, round_timefile,\
+from .forge import get_files_and_intervals, get_timefile_exact, round_timefile,\
     get_timefile, mp3_join
 from .config_manager import get_config
 

+ 4 - 5
setup.py

@@ -13,14 +13,13 @@ setup(
     author_email="piuttosto@logorroici.org",
     packages=["techrec"],
     package_dir={"techrec": "server"},
-    install_requires=[
-        "Paste~=3.2",
-        "SQLAlchemy==0.8.3",
-        "bottle~=0.12",
-    ],
+    install_requires=["Paste~=3.2", "SQLAlchemy==0.8.3", "bottle~=0.12"],
     classifiers=["Programming Language :: Python :: 2.7"],
     entry_points={"console_scripts": ["techrec = techrec.cli:main"]},
     zip_safe=False,
     install_package_data=True,
     package_data={"techrec": ["static/**/*", "pages/*.html"]},
+    test_suite="nose.collector",
+    setup_requires=["nose>=1.0"],
+    tests_requires=["nose>=1.0"],
 )