unplugged-system/build/soong/python/tests/top_level_dirs/main.py

18 lines
371 B
Python

import unittest
import sys
print(sys.path, file=sys.stderr)
class TestProtoWithPkgPath(unittest.TestCase):
def test_cant_import_mymodule_directly(self):
with self.assertRaises(ImportError):
import mymodule
def test_can_import_mymodule_by_parent_package(self):
import mypkg.mymodule
if __name__ == '__main__':
unittest.main()