mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Moved from nose to py.test (the former doesn't officially support py3k, which is limiting).
This commit is contained in:
parent
fdde538b66
commit
4d66b4667c
2
README
2
README
@ -32,7 +32,7 @@ General dependencies
|
|||||||
- lxml, to read and write XML files. (http://codespeak.net/lxml/)
|
- lxml, to read and write XML files. (http://codespeak.net/lxml/)
|
||||||
- Mako, to generate help files. (http://www.makotemplates.org/)
|
- Mako, to generate help files. (http://www.makotemplates.org/)
|
||||||
- PyYaml, for help files and the build system. (http://pyyaml.org/)
|
- PyYaml, for help files and the build system. (http://pyyaml.org/)
|
||||||
- Nose, to run unit tests. (http://somethingaboutorange.com/mrl/projects/nose/)
|
- py.test, to run unit tests. (http://codespeak.net/py/dist/test/)
|
||||||
|
|
||||||
OS X prerequisites
|
OS X prerequisites
|
||||||
-----
|
-----
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from nose.tools import eq_
|
from hsutil.testutil import eq_
|
||||||
|
|
||||||
from hsutil.testcase import TestCase
|
from hsutil.testcase import TestCase
|
||||||
from hsutil import io
|
from hsutil import io
|
||||||
from hsutil.path import Path
|
from hsutil.path import Path
|
||||||
|
28
core/tests/conftest.py
Normal file
28
core/tests/conftest.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Created By: Virgil Dupras
|
||||||
|
# Created On: 2010-07-11
|
||||||
|
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.hardcoded.net/licenses/bsd_license
|
||||||
|
|
||||||
|
# This unit is required to make tests work with py.test. When running
|
||||||
|
|
||||||
|
import py
|
||||||
|
|
||||||
|
def get_testunit(item):
|
||||||
|
if hasattr(item, 'obj'):
|
||||||
|
testunit = py.builtin._getimself(item.obj)
|
||||||
|
if hasattr(testunit, 'global_setup'):
|
||||||
|
return testunit
|
||||||
|
|
||||||
|
def pytest_runtest_setup(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_setup()
|
||||||
|
|
||||||
|
def pytest_runtest_teardown(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_teardown()
|
@ -10,10 +10,9 @@ import os.path as op
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from nose.tools import eq_
|
|
||||||
|
|
||||||
from hsutil import io
|
from hsutil import io
|
||||||
from hsutil.path import Path
|
from hsutil.path import Path
|
||||||
|
from hsutil.testutil import eq_
|
||||||
from hsutil.testcase import TestCase
|
from hsutil.testcase import TestCase
|
||||||
|
|
||||||
from ..directories import *
|
from ..directories import *
|
||||||
|
@ -8,11 +8,10 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from nose.tools import eq_
|
|
||||||
|
|
||||||
from hscommon import job
|
from hscommon import job
|
||||||
from hsutil.decorators import log_calls
|
from hsutil.decorators import log_calls
|
||||||
from hsutil.misc import first
|
from hsutil.misc import first
|
||||||
|
from hsutil.testutil import eq_
|
||||||
from hsutil.testcase import TestCase
|
from hsutil.testcase import TestCase
|
||||||
|
|
||||||
from .. import engine
|
from .. import engine
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import cStringIO
|
import cStringIO
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
from nose.tools import eq_
|
from hsutil.testutil import eq_
|
||||||
|
|
||||||
from ..ignore import *
|
from ..ignore import *
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@ import StringIO
|
|||||||
import os.path as op
|
import os.path as op
|
||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from nose.tools import eq_
|
|
||||||
|
|
||||||
from hsutil.path import Path
|
from hsutil.path import Path
|
||||||
|
from hsutil.testutil import eq_
|
||||||
from hsutil.testcase import TestCase
|
from hsutil.testcase import TestCase
|
||||||
from hsutil.misc import first
|
from hsutil.misc import first
|
||||||
|
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
# which should be included with this package. The terms are also available at
|
# which should be included with this package. The terms are also available at
|
||||||
# http://www.hardcoded.net/licenses/hs_license
|
# http://www.hardcoded.net/licenses/hs_license
|
||||||
|
|
||||||
from nose.tools import eq_
|
|
||||||
|
|
||||||
from hscommon import job
|
from hscommon import job
|
||||||
from hsutil import io
|
from hsutil import io
|
||||||
from hsutil.path import Path
|
from hsutil.path import Path
|
||||||
|
from hsutil.testutil import eq_
|
||||||
from hsutil.testcase import TestCase
|
from hsutil.testcase import TestCase
|
||||||
|
|
||||||
from .. import fs
|
from .. import fs
|
||||||
|
28
core_me/tests/conftest.py
Normal file
28
core_me/tests/conftest.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Created By: Virgil Dupras
|
||||||
|
# Created On: 2010-07-11
|
||||||
|
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.hardcoded.net/licenses/bsd_license
|
||||||
|
|
||||||
|
# This unit is required to make tests work with py.test. When running
|
||||||
|
|
||||||
|
import py
|
||||||
|
|
||||||
|
def get_testunit(item):
|
||||||
|
if hasattr(item, 'obj'):
|
||||||
|
testunit = py.builtin._getimself(item.obj)
|
||||||
|
if hasattr(testunit, 'global_setup'):
|
||||||
|
return testunit
|
||||||
|
|
||||||
|
def pytest_runtest_setup(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_setup()
|
||||||
|
|
||||||
|
def pytest_runtest_teardown(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_teardown()
|
28
core_pe/tests/conftest.py
Normal file
28
core_pe/tests/conftest.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Created By: Virgil Dupras
|
||||||
|
# Created On: 2010-07-11
|
||||||
|
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.hardcoded.net/licenses/bsd_license
|
||||||
|
|
||||||
|
# This unit is required to make tests work with py.test. When running
|
||||||
|
|
||||||
|
import py
|
||||||
|
|
||||||
|
def get_testunit(item):
|
||||||
|
if hasattr(item, 'obj'):
|
||||||
|
testunit = py.builtin._getimself(item.obj)
|
||||||
|
if hasattr(testunit, 'global_setup'):
|
||||||
|
return testunit
|
||||||
|
|
||||||
|
def pytest_runtest_setup(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_setup()
|
||||||
|
|
||||||
|
def pytest_runtest_teardown(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_teardown()
|
28
core_se/tests/conftest.py
Normal file
28
core_se/tests/conftest.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Created By: Virgil Dupras
|
||||||
|
# Created On: 2010-07-11
|
||||||
|
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.hardcoded.net/licenses/bsd_license
|
||||||
|
|
||||||
|
# This unit is required to make tests work with py.test. When running
|
||||||
|
|
||||||
|
import py
|
||||||
|
|
||||||
|
def get_testunit(item):
|
||||||
|
if hasattr(item, 'obj'):
|
||||||
|
testunit = py.builtin._getimself(item.obj)
|
||||||
|
if hasattr(testunit, 'global_setup'):
|
||||||
|
return testunit
|
||||||
|
|
||||||
|
def pytest_runtest_setup(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_setup()
|
||||||
|
|
||||||
|
def pytest_runtest_teardown(item):
|
||||||
|
testunit = get_testunit(item)
|
||||||
|
if testunit is not None:
|
||||||
|
testunit.global_teardown()
|
@ -9,9 +9,8 @@
|
|||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from nose.tools import eq_
|
|
||||||
|
|
||||||
from hsutil.testcase import TestCase
|
from hsutil.testcase import TestCase
|
||||||
|
from hsutil.testutil import eq_
|
||||||
from core.fs import File
|
from core.fs import File
|
||||||
from core.tests.directories_test import create_fake_fs
|
from core.tests.directories_test import create_fake_fs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user