Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unittest2 dependency #1142

Merged
merged 3 commits into from
Jan 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
codecov==2.0.15
coverage==4.5.4
flake8==3.7.8
pytz==2019.2
tox==3.14.0
traceback2==1.4.0
unittest2==1.1.0
-r requirements.txt
6 changes: 1 addition & 5 deletions src/pynwb/base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
from warnings import warn

try:
from collections.abc import Iterable # Python 3
except ImportError:
from collections import Iterable # Python 2.7
from collections.abc import Iterable

from hdmf.utils import docval, getargs, popargs, call_docval_func
from hdmf.common import DynamicTable
Expand Down
5 changes: 1 addition & 4 deletions src/pynwb/ecephys.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
try:
from collections.abc import Iterable # Python 3
except ImportError:
from collections import Iterable # Python 2.7
from collections.abc import Iterable

from hdmf.utils import docval, getargs, popargs, call_docval_func, get_docval
from hdmf.data_utils import DataChunkIterator, assertEqualShape
Expand Down
5 changes: 1 addition & 4 deletions src/pynwb/file.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from datetime import datetime
from dateutil.tz import tzlocal
try:
from collections.abc import Iterable # Python 3
except ImportError:
from collections import Iterable # Python 2.7
from collections.abc import Iterable
from warnings import warn
import copy as _copy

Expand Down
5 changes: 1 addition & 4 deletions src/pynwb/image.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import warnings
try:
from collections.abc import Iterable # Python 3
except ImportError:
from collections import Iterable # Python 2.7
from collections.abc import Iterable

from hdmf.utils import docval, popargs, call_docval_func, get_docval

Expand Down
5 changes: 1 addition & 4 deletions src/pynwb/misc.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import numpy as np
try:
from collections.abc import Iterable # Python 3
except ImportError:
from collections import Iterable # Python 2.7
from collections.abc import Iterable
import warnings
from bisect import bisect_left, bisect_right

Expand Down
5 changes: 1 addition & 4 deletions src/pynwb/ophys.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
try:
from collections.abc import Iterable # Python 3
except ImportError:
from collections import Iterable # Python 2.7
from collections.abc import Iterable

from hdmf.utils import docval, getargs, popargs, call_docval_func, get_docval

Expand Down
5 changes: 1 addition & 4 deletions src/pynwb/retinotopy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
try:
from collections.abc import Iterable # Python 3
except ImportError:
from collections import Iterable # Python 2.7
from collections.abc import Iterable

from hdmf.utils import docval, popargs, call_docval_func

Expand Down
2 changes: 0 additions & 2 deletions src/pynwb/validate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

import os
import sys
from argparse import ArgumentParser
Expand Down
5 changes: 1 addition & 4 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env python

from __future__ import print_function

import warnings
import re
import argparse
Expand All @@ -12,7 +9,7 @@
import os
import sys
import traceback
import unittest2 as unittest
import unittest
from tests.coloredtestrunner import ColoredTestRunner, ColoredTestResult

flags = {'pynwb': 2, 'integration': 3, 'example': 4}
Expand Down
2 changes: 1 addition & 1 deletion tests/coloredtestrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from io import StringIO
import sys
import re
import unittest2 as unittest
import unittest
import textwrap


Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_io.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
from datetime import datetime
from dateutil.tz import tzlocal, tzutc
import re
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ui_write/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
from datetime import datetime
from dateutil.tz import tzlocal, tzutc
import os
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ui_write/test_ecephys.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest

from hdmf.build import GroupBuilder, DatasetBuilder, LinkBuilder, ReferenceBuilder

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ui_write/test_legacy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

import unittest2 as unittest
import unittest

import pynwb

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ui_write/test_ophys.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
import numpy as np
from copy import deepcopy

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_MultiContainerInterface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest

from pynwb.file import MultiContainerInterface, NWBDataInterface
from hdmf.utils import docval, get_docval
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
import numpy as np

from pynwb.base import ProcessingModule, TimeSeries, Images, Image
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime

import unittest2 as unittest
import unittest
from dateutil.tz import tzlocal
from pynwb import NWBFile, TimeSeries, available_namespaces
from pynwb.core import LabelledDict
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_core_NWBContainer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest

from pynwb.core import NWBContainer
from hdmf.utils import docval, call_docval_func
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_ecephys.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import unittest2 as unittest
import unittest
import re
import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dateutil.tz import tzlocal
from tempfile import gettempdir

import unittest2 as unittest
import unittest
from pynwb import get_type_map, TimeSeries, NWBFile, register_class, docval, load_namespaces, popargs, get_class
from hdmf.spec.spec import RefSpec
from hdmf.utils import get_docval
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_file.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
''' Tests for NWBFile '''
import unittest2 as unittest
import unittest
import numpy as np
import os
import pandas as pd
Expand Down