Permalink
Browse files

testing libraries directory scheme

  • Loading branch information...
1 parent 2a73d95 commit 2a6e287e745ccc9e3ff9090e92f8aa1aaeb6457b Alexander Hiam committed Mar 31, 2012
Showing with 27 additions and 0 deletions.
  1. +10 −0 libraries/example.py
  2. +17 −0 tests/library_test.py
View
10 libraries/example.py
@@ -0,0 +1,10 @@
+# This is just an example to demonstrate libraries directory
+# scheme for PyBBIO.
+# To test:
+# run PyBBIO/tests/library_test.py
+
+
+def foo():
+ print "Hello, world!"
+
+
View
17 tests/library_test.py
@@ -0,0 +1,17 @@
+# A quick test to demonstrate the libraries directory scheme.
+#
+# imports and tests PyBBIO/libraries/example.py
+
+try:
+ import example
+except:
+ print "\nWe can't import the PyBBIO library until we've imported bbio"
+
+print "Importing bbio"
+from bbio import *
+
+print "now we can import example"
+import example
+
+print "testing example library:"
+example.foo()

0 comments on commit 2a6e287

Please sign in to comment.