Skip to content

Commit

Permalink
Remove unittest2 (#1490)
Browse files Browse the repository at this point in the history
* Fix backward compatibility for unittest

* Fix import problem

* Update test_ldamallet_wrapper.py

* Update unittest import

* Fix error

* Fix PEP8 error

* Remove commented code for unittest2

* Remove unittest2 requirements

* Remove unittest2 from setup.py
  • Loading branch information
souravsingh authored and menshikh-iv committed Jul 21, 2017
1 parent 5f54b60 commit 12f36b5
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test_script:
# installed library.
- "mkdir empty_folder"
- "cd empty_folder"
- "pip install pyemd testfixtures unittest2 sklearn Morfessor==2.0.2a4"
- "pip install pyemd testfixtures sklearn Morfessor==2.0.2a4"
- "pip freeze"
- "python -c \"import nose; nose.main()\" -s -v gensim"
# Move back to the project folder
Expand Down
2 changes: 1 addition & 1 deletion gensim/test/test_ldamallet_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


import logging
import unittest2 as unittest
import unittest
import os
import os.path
import tempfile
Expand Down
6 changes: 0 additions & 6 deletions gensim/test/test_sharded_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
"""
import os

# For backwards compatibility with setUpClass and tearDownClass:
# import sys
# if sys.version_info[0] == 2 and sys.version_info[1] <= 6:
# import unittest2 as unittest
# else:
# import unittest
import unittest

import random
Expand Down
5 changes: 1 addition & 4 deletions gensim/test/test_varembed_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

import numpy as np

if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
import unittest

from gensim.models.wrappers import varembed

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ def finalize_options(self):

test_env = [
'testfixtures',
'unittest2',
'Morfessor == 2.0.2a4',
'scikit-learn',
'pyemd',
Expand Down

0 comments on commit 12f36b5

Please sign in to comment.