nose → py.test
This commit is contained in:
parent
193d77ae09
commit
d302596d73
3 changed files with 11 additions and 10 deletions
|
@ -14,7 +14,8 @@ mypy:
|
|||
test:
|
||||
stage: test
|
||||
before_script:
|
||||
- pip install nose
|
||||
- pip install pytest
|
||||
- pip install -r requirements.txt
|
||||
- mkdir output
|
||||
script:
|
||||
- nosetests
|
||||
- pytest
|
||||
|
|
3
setup.py
3
setup.py
|
@ -22,7 +22,4 @@ setup(
|
|||
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"],
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
from nose.tools import raises, eq_
|
||||
from pytest import raises
|
||||
|
||||
from .forge import (
|
||||
get_files_and_intervals,
|
||||
|
@ -21,6 +21,9 @@ get_config()["FFMPEG_PATH"] = "ffmpeg"
|
|||
get_config()["FFMPEG_OUT_CODEC"] = ["-acodec", "copy"]
|
||||
|
||||
|
||||
def eq_(a,b):
|
||||
assert a==b, "%r != %r" % (a,b)
|
||||
|
||||
def minutes(n):
|
||||
return timedelta(minutes=n)
|
||||
|
||||
|
@ -63,14 +66,14 @@ def test_timefile_toround():
|
|||
# Intervals
|
||||
|
||||
|
||||
@raises(ValueError)
|
||||
def test_intervals_same():
|
||||
tuple(get_files_and_intervals(eight, eight))
|
||||
with raises(ValueError):
|
||||
tuple(get_files_and_intervals(eight, eight))
|
||||
|
||||
|
||||
@raises(ValueError)
|
||||
def test_intervals_before():
|
||||
tuple(get_files_and_intervals(nine, eight))
|
||||
with raises(ValueError):
|
||||
tuple(get_files_and_intervals(nine, eight))
|
||||
|
||||
|
||||
def test_intervals_full_1():
|
||||
|
|
Loading…
Reference in a new issue