-
Notifications
You must be signed in to change notification settings - Fork 404
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
dummy pr to test new ci #273
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,7 +145,7 @@ def test_init_savepath(self): | |
Test that we can save requirements.txt correctly | ||
to a different path | ||
""" | ||
pipreqs.init({'<path>': self.project, '--savepath': self.alt_requirement_path, | ||
pipreqs.init({'<path>': self.project, '--savepath': self.alt_requirement_path, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [flake8] <501> reported by reviewdog 🐶 |
||
'--use-local': None, '--proxy':None, '--pypi-server':None, '--print': False, | ||
'--diff': None, '--clean': None, '--mode': None}) | ||
assert os.path.exists(self.alt_requirement_path) == 1 | ||
|
@@ -163,7 +163,7 @@ def test_init_overwrite(self): | |
""" | ||
with open(self.requirements_path, "w") as f: | ||
f.write("should_not_be_overwritten") | ||
pipreqs.init({'<path>': self.project, '--savepath': None, '--use-local': None, | ||
pipreqs.init({'<path>': self.project, '--savepath': None, '--use-local': None, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [flake8] <501> reported by reviewdog 🐶 |
||
'--force': None, '--proxy':None, '--pypi-server':None, '--print': False, | ||
'--diff': None, '--clean': None, '--mode': None}) | ||
assert os.path.exists(self.requirements_path) == 1 | ||
|
@@ -203,7 +203,7 @@ def test_ignored_directory(self): | |
Test --ignore parameter | ||
""" | ||
pipreqs.init( | ||
{'<path>': self.project_with_ignore_directory, '--savepath': None, | ||
{'<path>': self.project_with_ignore_directory, '--savepath': None, | ||
'--print': False, '--use-local': None, '--force': True, | ||
'--proxy':None, '--pypi-server':None, | ||
'--ignore':'.ignored_dir,.ignore_second', | ||
|
@@ -222,7 +222,7 @@ def test_dynamic_version_no_pin_scheme(self): | |
Test --mode=no-pin | ||
""" | ||
pipreqs.init( | ||
{'<path>': self.project_with_ignore_directory, '--savepath': None, | ||
{'<path>': self.project_with_ignore_directory, '--savepath': None, | ||
'--print': False, '--use-local': None, '--force': True, | ||
'--proxy': None, '--pypi-server': None, | ||
'--diff': None, | ||
|
@@ -235,92 +235,7 @@ def test_dynamic_version_no_pin_scheme(self): | |
for item in ['beautifulsoup4', 'boto']: | ||
self.assertTrue(item.lower() in data) | ||
|
||
def test_dynamic_version_gt_scheme(self): | ||
""" | ||
Test --mode=gt | ||
""" | ||
pipreqs.init( | ||
{'<path>': self.project_with_ignore_directory, '--savepath': None, '--print': False, | ||
'--use-local': None, '--force': True, | ||
'--proxy': None, | ||
'--pypi-server': None, | ||
'--diff': None, | ||
'--clean': None, | ||
'--mode': 'gt' | ||
} | ||
) | ||
with open(os.path.join(self.project_with_ignore_directory, "requirements.txt"), "r") as f: | ||
data = f.readlines() | ||
for item in data: | ||
symbol = '>=' | ||
message = 'symbol is not in item' | ||
self.assertIn(symbol, item, message) | ||
|
||
def test_dynamic_version_compat_scheme(self): | ||
""" | ||
Test --mode=compat | ||
""" | ||
pipreqs.init( | ||
{'<path>': self.project_with_ignore_directory, '--savepath': None, '--print': False, | ||
'--use-local': None, '--force': True, | ||
'--proxy': None, | ||
'--pypi-server': None, | ||
'--diff': None, | ||
'--clean': None, | ||
'--mode': 'compat' | ||
} | ||
) | ||
with open(os.path.join(self.project_with_ignore_directory, "requirements.txt"), "r") as f: | ||
data = f.readlines() | ||
for item in data: | ||
symbol = '~=' | ||
message = 'symbol is not in item' | ||
self.assertIn(symbol, item, message) | ||
|
||
def test_clean(self): | ||
""" | ||
Test --clean parameter | ||
""" | ||
pipreqs.init( | ||
{'<path>': self.project, '--savepath': None, '--print': False, | ||
'--use-local': None, '--force': True, '--proxy': None, | ||
'--pypi-server': None, '--diff': None, '--clean': None, | ||
'--mode': None} | ||
) | ||
assert os.path.exists(self.requirements_path) == 1 | ||
pipreqs.init( | ||
{'<path>': self.project, '--savepath': None, '--print': False, | ||
'--use-local': None, '--force': None, '--proxy': None, | ||
'--pypi-server': None, '--diff': None, | ||
'--clean': self.requirements_path, '--mode': 'non-pin'} | ||
) | ||
with open(self.requirements_path, "r") as f: | ||
data = f.read().lower() | ||
for item in self.modules[:-3]: | ||
self.assertTrue(item.lower() in data) | ||
|
||
def test_clean_with_imports_to_clean(self): | ||
""" | ||
Test --clean parameter when there are imports to clean | ||
""" | ||
cleaned_module = 'sqlalchemy' | ||
pipreqs.init( | ||
{'<path>': self.project, '--savepath': None, '--print': False, | ||
'--use-local': None, '--force': True, '--proxy': None, | ||
'--pypi-server': None, '--diff': None, '--clean': None, | ||
'--mode': None} | ||
) | ||
assert os.path.exists(self.requirements_path) == 1 | ||
modules_clean = [m for m in self.modules if m != cleaned_module] | ||
pipreqs.init( | ||
{'<path>': self.project_clean, '--savepath': None, | ||
'--print': False, '--use-local': None, '--force': None, | ||
'--proxy': None, '--pypi-server': None, '--diff': None, | ||
'--clean': self.requirements_path, '--mode': 'non-pin'} | ||
) | ||
with open(self.requirements_path, "r") as f: | ||
data = f.read().lower() | ||
self.assertTrue(cleaned_module not in data) | ||
|
||
def tearDown(self): | ||
""" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [flake8] <501> reported by reviewdog 🐶
line too long (129 > 79 characters)