forked from python/cpython
-
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.
bpo-36876: Add a tool that identifies unsupported global C variables. (…
- Loading branch information
1 parent
9936371
commit ee536b2
Showing
51 changed files
with
9,467 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import unittest | ||
import test.test_tools | ||
|
||
test.test_tools.skip_if_missing('c-analyzer') | ||
with test.test_tools.imports_under_tool('c-analyzer'): | ||
from c_globals.__main__ import main | ||
|
||
|
||
class ActualChecks(unittest.TestCase): | ||
|
||
# XXX Also run the check in "make check". | ||
@unittest.expectedFailure | ||
def test_check_c_globals(self): | ||
try: | ||
main('check', {}) | ||
except NotImplementedError: | ||
raise unittest.SkipTest('not supported on this host') | ||
|
||
|
||
if __name__ == '__main__': | ||
# Test needs to be a package, so we can do relative imports. | ||
unittest.main() |
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,15 @@ | ||
import contextlib | ||
import os.path | ||
import test.test_tools | ||
from test.support import load_package_tests | ||
|
||
|
||
@contextlib.contextmanager | ||
def tool_imports_for_tests(): | ||
test.test_tools.skip_if_missing('c-analyzer') | ||
with test.test_tools.imports_under_tool('c-analyzer'): | ||
yield | ||
|
||
|
||
def load_tests(*args): | ||
return load_package_tests(os.path.dirname(__file__), *args) |
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,5 @@ | ||
from . import load_tests | ||
import unittest | ||
|
||
|
||
unittest.main() |
Empty file.
Oops, something went wrong.