-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from atollk/i2023
I2023
- Loading branch information
Showing
4 changed files
with
74 additions
and
4 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from tests.util import BaseTest | ||
|
||
|
||
class Test_I2023(BaseTest): | ||
def error_code(self) -> str: | ||
return "I2023" | ||
|
||
def test_pass_1(self): | ||
code = """ | ||
from os import path | ||
""" | ||
result = self.run_flake8(code) | ||
assert result == [] | ||
|
||
def test_pass_2(self): | ||
code = """ | ||
import os.path as ospath | ||
""" | ||
result = self.run_flake8(code) | ||
assert result == [] | ||
|
||
def test_fail_1(self): | ||
code = """ | ||
import os.path as path | ||
""" | ||
result = self.run_flake8(code) | ||
self.assert_error_at(result, "I2023", 1, 1) |