Skip to content
This repository
Browse code

testing libraries directory scheme

  • Loading branch information...
commit 2a6e287e745ccc9e3ff9090e92f8aa1aaeb6457b 1 parent 2a73d95
Alexander Hiam authored

Showing 2 changed files with 27 additions and 0 deletions. Show diff stats Hide diff stats

  1. +10 0 libraries/example.py
  2. +17 0 tests/library_test.py
10 libraries/example.py
... ... @@ -0,0 +1,10 @@
  1 +# This is just an example to demonstrate libraries directory
  2 +# scheme for PyBBIO.
  3 +# To test:
  4 +# run PyBBIO/tests/library_test.py
  5 +
  6 +
  7 +def foo():
  8 + print "Hello, world!"
  9 +
  10 +
17 tests/library_test.py
... ... @@ -0,0 +1,17 @@
  1 +# A quick test to demonstrate the libraries directory scheme.
  2 +#
  3 +# imports and tests PyBBIO/libraries/example.py
  4 +
  5 +try:
  6 + import example
  7 +except:
  8 + print "\nWe can't import the PyBBIO library until we've imported bbio"
  9 +
  10 +print "Importing bbio"
  11 +from bbio import *
  12 +
  13 +print "now we can import example"
  14 +import example
  15 +
  16 +print "testing example library:"
  17 +example.foo()

0 comments on commit 2a6e287

Please sign in to comment.
Something went wrong with that request. Please try again.