Python: Add test to ensure we keep DataFlow imports clean

Currently we're not in a good state :(
This commit is contained in:
Rasmus Wriedt Larsen
2022-04-13 12:27:06 +02:00
parent e60475618d
commit 5dbbd17bb2
4 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
Sometimes we accidentally re-export too much from `DataFlow` such that for example we can access `Add` from `DataFlow::Add` :disappointed:
This test should always FAIL to compile!

View File

@@ -0,0 +1 @@
| Add |

View File

@@ -0,0 +1,8 @@
import python
private import semmle.python.dataflow.new.DataFlow
// Sometimes we accidentally re-export too much from `DataFlow` such that for example we can access `Add` from `DataFlow::Add` :(
//
// This test should always FAIL to compile!
from DataFlow::Add this_should_not_work
select this_should_not_work

View File

@@ -0,0 +1 @@
1+1