mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-07 12:05:33 +00:00
Test both 2 and 3 differenlty
This commit is contained in:
parent
c17eb5fd0d
commit
2d33fb0936
@ -7,7 +7,7 @@ test_pipreqs
|
|||||||
|
|
||||||
Tests for `pipreqs` module.
|
Tests for `pipreqs` module.
|
||||||
"""
|
"""
|
||||||
from io import BytesIO
|
from io import BytesIO, StringIO
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
@ -100,7 +100,10 @@ class TestPipreqs(unittest.TestCase):
|
|||||||
Test that all modules we will test upon, are written out in alphabetic order
|
Test that all modules we will test upon, are written out in alphabetic order
|
||||||
"""
|
"""
|
||||||
self.modules.extend(self.modules2)
|
self.modules.extend(self.modules2)
|
||||||
mock, sys.stdout = sys.stdout, BytesIO()
|
if sys.version_info < (3, 0):
|
||||||
|
mock, sys.stdout = sys.stdout, BytesIO()
|
||||||
|
else:
|
||||||
|
mock, sys.stdout = sys.stdout, StringIO()
|
||||||
pipreqs.init({'<path>': self.project, '--savepath': None, '--print': True,
|
pipreqs.init({'<path>': self.project, '--savepath': None, '--print': True,
|
||||||
'--use-local': None, '--force': True, '--proxy': None, '--pypi-server': None,
|
'--use-local': None, '--force': True, '--proxy': None, '--pypi-server': None,
|
||||||
'--diff': None, '--clean': None})
|
'--diff': None, '--clean': None})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user