Add imports attribute to Bazel native Python rules to allow adding directories to PYTHONPATH.
Fixes #702
RELNOTES: Add imports attribute to native Python rules.
--
MOS_MIGRATED_REVID=114314430
diff --git a/examples/py_native/test.py b/examples/py_native/test.py
index 811eee1..f9543aa 100644
--- a/examples/py_native/test.py
+++ b/examples/py_native/test.py
@@ -1,6 +1,8 @@
"""A tiny example binary for the native Python rules of Bazel."""
+
import unittest
from examples.py_native.lib import GetNumber
+from fib import Fib
class TestGetNumber(unittest.TestCase):
@@ -8,6 +10,8 @@
def test_ok(self):
self.assertEquals(GetNumber(), 42)
+ def test_fib(self):
+ self.assertEquals(Fib(5), 8)
if __name__ == '__main__':
unittest.main()