mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Python: Add tests to illustrate shortcomings of current tests filter
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
| Class MyTest |
|
||||
| Function test_1 |
|
||||
| Function test_2 |
|
||||
| test.py:4:1:4:23 | Class MyTest |
|
||||
| test.py:6:5:6:21 | Function test_1 |
|
||||
| test.py:9:5:9:21 | Function test_2 |
|
||||
|
||||
@@ -2,4 +2,4 @@ import python
|
||||
import semmle.python.filters.Tests
|
||||
|
||||
from TestScope t
|
||||
select t.toString()
|
||||
select t
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
class TestCase:
|
||||
pass
|
||||
|
||||
|
||||
4
python/ql/test/library-tests/filters/tests/test_foo.py
Normal file
4
python/ql/test/library-tests/filters/tests/test_foo.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# This is running under some unknown framework, but is clearly a test!
|
||||
|
||||
def test_foo():
|
||||
assert True
|
||||
@@ -0,0 +1,5 @@
|
||||
import unittest
|
||||
|
||||
class FooTest(unittest.TestCase):
|
||||
def test_valid(self):
|
||||
pass
|
||||
Reference in New Issue
Block a user