mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Python: Expand test-filter tests
With no virtual environment enabled, none of the third-party library test case are found.
This commit is contained in:
@@ -4,3 +4,5 @@
|
|||||||
| test_foo.py:3:1:3:15 | Function test_foo |
|
| test_foo.py:3:1:3:15 | Function test_foo |
|
||||||
| unittest_test.py:3:1:3:33 | Class FooTest |
|
| unittest_test.py:3:1:3:33 | Class FooTest |
|
||||||
| unittest_test.py:4:5:4:25 | Function test_valid |
|
| unittest_test.py:4:5:4:25 | Function test_valid |
|
||||||
|
| unittest_test.py:7:1:7:49 | Class FunctionFooTest |
|
||||||
|
| unittest_test.py:8:5:8:25 | Function test_valid |
|
||||||
|
|||||||
@@ -3,3 +3,29 @@ import unittest
|
|||||||
class FooTest(unittest.TestCase):
|
class FooTest(unittest.TestCase):
|
||||||
def test_valid(self):
|
def test_valid(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class FunctionFooTest(unittest.FunctionTestCase):
|
||||||
|
def test_valid(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class AsyncTest(unittest.IsolatedAsyncioTestCase):
|
||||||
|
async def test_valid(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# django -- see https://docs.djangoproject.com/en/4.0/topics/testing/overview/
|
||||||
|
import django.test
|
||||||
|
class MyDjangoUnitTest(django.test.TestCase):
|
||||||
|
def test_valid(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# flask -- see https://pythonhosted.org/Flask-Testing/
|
||||||
|
import flask_testing
|
||||||
|
class MyFlaskUnitTest(flask_testing.LiveServerTestCase):
|
||||||
|
def test_valid(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# tornado -- see https://www.tornadoweb.org/en/stable/testing.html#tornado.testing.AsyncHTTPTestCase
|
||||||
|
import tornado.testing
|
||||||
|
class MyTornadoUnitTest(tornado.testing.AsyncHTTPTestCase):
|
||||||
|
def test_valid(self):
|
||||||
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user