-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:spectriclabs/xmextras into main
- Loading branch information
Showing
4 changed files
with
93 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pytest | ||
|
||
import xmextras.mcrlint | ||
|
||
def test_check_line(tmp_path): | ||
bad_macro_path = tmp_path / 'bad_macro.txt' | ||
|
||
with bad_macro_path.open('w') as out: | ||
out.write(' ' * 201) | ||
out.write('\n') | ||
out.write(' do_thing ! TODO: make do thing\n') | ||
out.write('\tdo_other_thing\n') | ||
out.write(' sloppy ! FIXME \n') | ||
|
||
issues = list(xmextras.mcrlint.check_file(bad_macro_path, xmextras.mcrlint.get_active_plugins(''))) | ||
assert len(issues) == 6 | ||
|
||
issues = list(xmextras.mcrlint.check_file(bad_macro_path, xmextras.mcrlint.get_active_plugins('fixme'))) | ||
assert len(issues) == 4 |
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