Skip to content

Commit 5dbbd17

Browse files
committed
Python: Add test to ensure we keep DataFlow imports clean
Currently we're not in a good state :(
1 parent e604756 commit 5dbbd17

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Sometimes we accidentally re-export too much from `DataFlow` such that for example we can access `Add` from `DataFlow::Add` :disappointed:
2+
3+
This test should always FAIL to compile!
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| Add |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import python
2+
private import semmle.python.dataflow.new.DataFlow
3+
4+
// Sometimes we accidentally re-export too much from `DataFlow` such that for example we can access `Add` from `DataFlow::Add` :(
5+
//
6+
// This test should always FAIL to compile!
7+
from DataFlow::Add this_should_not_work
8+
select this_should_not_work
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1+1

0 commit comments

Comments
 (0)