Skip to content

Commit

Permalink
Add a test for __name__ in another module
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Jun 20, 2022
1 parent fff13a3 commit dec26a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration_tests/test_vars_01.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from test_vars_01b import test_name_other_module

def test_name():
print(__name__)
assert __name__ == "__main__"

test_name()
test_name_other_module()
3 changes: 3 additions & 0 deletions integration_tests/test_vars_01b.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def test_name_other_module():
print(__name__)
assert __name__ != "__main__"

0 comments on commit dec26a9

Please sign in to comment.