fix lint issue

This commit is contained in:
Kazuma (Pakio) Arimura 2022-07-17 11:14:31 +09:00
parent ef4cb12249
commit f633fcf2fd
2 changed files with 9 additions and 10 deletions

View File

@ -1,5 +1,4 @@
wheel==0.23.0 wheel==0.23.0
Yarg==0.1.9 Yarg==0.1.9
docopt==0.6.2 docopt==0.6.2
nbconvert==5.4.1 nbconvert==6.0.7
ipython==5.4.1

View File

@ -49,20 +49,20 @@ class TestPipreqs(unittest.TestCase):
"requirements2.txt" "requirements2.txt"
) )
self.project_with_notebooks = os.path.join( self.project_with_notebooks = os.path.join(
os.path.dirname(__file__), os.path.dirname(__file__),
"_data_notebook" "_data_notebook"
) )
self.project_with_invalid_notebooks = os.path.join( self.project_with_invalid_notebooks = os.path.join(
os.path.dirname(__file__), os.path.dirname(__file__),
"_invalid_data_notebook" "_invalid_data_notebook"
) )
self.compatible_files_path = { self.compatible_files = {
"original": os.path.join( "original": os.path.join(
os.path.dirname(__file__), os.path.dirname(__file__),
"_data/test.py" "_data/test.py"
), ),
"notebook": os.path.join( "notebook": os.path.join(
os.path.dirname(__file__), os.path.dirname(__file__),
"_data_notebook/test.ipynb" "_data_notebook/test.ipynb"
)} )}
@ -374,12 +374,12 @@ class TestPipreqs(unittest.TestCase):
""" """
Test the function ipynb_2_py() which converts .ipynb file to .py format Test the function ipynb_2_py() which converts .ipynb file to .py format
""" """
expected = pipreqs.get_all_imports(self.compatible_files_path["original"]) expected = pipreqs.get_all_imports(self.compatible_files["original"])
parsed = pipreqs.get_all_imports(self.compatible_files_path["notebook"]) parsed = pipreqs.get_all_imports(self.compatible_files["notebook"])
self.assertEqual(expected, parsed) self.assertEqual(expected, parsed)
parsed = pipreqs.get_all_imports( parsed = pipreqs.get_all_imports(
self.compatible_files_path["notebook"], self.compatible_files["notebook"],
encoding="utf-8" encoding="utf-8"
) )
self.assertEqual(expected, parsed) self.assertEqual(expected, parsed)