示例#1
0
 def test_convert_all_channels(self):
     # Test that channels 1, 2 and 3 convert successfully
     for ch in xrange(1, 4):
         self.assertRaises(
             SystemExit, lambda: msmm_to_biggles(
                 (self.features_dat_path, str(ch), '-o', self.output_path)))
示例#2
0
 def test_convert_channel_1(self):
     # Test that channel 1 converts successfully
     self.assertRaises(
         SystemExit, lambda: msmm_to_biggles(
             (self.features_dat_path, '1', '-o', self.output_path)))
示例#3
0
 def test_help_option(self):
     # Check that help causes a successful exit
     self.assertRaises(SystemExit, lambda: msmm_to_biggles(('-h', )))
示例#4
0
 def test_convert_invalid_channel(self):
     # Test that an invalid channel does not convert successfully
     for ch in (0, 4):
         self.assertRaises(
             SystemExit, lambda: msmm_to_biggles(
                 (self.features_dat_path, str(ch))))
#!@PYTHON_EXECUTABLE@

import os
import sys

# Dodgy hack to automagically set the path for this script to allow for re-locatable tarball packages. If this script
# is at /foo/bar/bin/biggles, set the path to include /foo/bar/@PYTHON_SITE_PACKAGES@.
sys.path.insert(
    0,
    os.path.abspath(
        os.path.join(os.path.dirname(__file__), '..',
                     '@PYTHON_SITE_PACKAGES@')))

# Wrapper script for biggles command
if __name__ == '__main__':
    from biggles.convert import msmm_to_biggles
    msmm_to_biggles()