sire_test

8 views
Skip to first unread message

julien

unread,
Sep 17, 2014, 10:14:20 AM9/17/14
to sire-de...@googlegroups.com
Hi Chris, 

How can I run a single test with sire_test ? 

I can execute


which process all tests in ~/sire.app/test as far as I can tell. 

I would like to write a set of tests for the Nautilus module and add them to the source folder /python2/tests/

It would be convenient if I can run a single test in one go. 

There is some cleverness in bin/sire_test that eludes me at the moment because I cannot run nosetests directly on the sire test scripts


E
======================================================================
ERROR: Failure: ImportError (libSireStream.so.0: cannot open shared object file: No such file or directory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/julien/sire.app/bundled/lib/python3.3/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/julien/sire.app/bundled/lib/python3.3/site-packages/nose/loader.py", line 414, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/julien/sire.app/bundled/lib/python3.3/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/julien/sire.app/bundled/lib/python3.3/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/julien/sire.app/bundled/lib/python3.3/imp.py", line 180, in load_module
    return load_source(name, filename, file)
  File "/home/julien/sire.app/bundled/lib/python3.3/imp.py", line 119, in load_source
    _LoadSourceCompatibility(name, pathname, file).load_module(name)
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/home/julien/sire.app/test/SireBase/test_installdir.py", line 2, in <module>
    from Sire.Base import *
  File "/home/julien/sire.app/bundled/lib/python3.3/site-packages/Sire/__init__.py", line 13, in <module>
    import Sire.Qt
  File "/home/julien/sire.app/bundled/lib/python3.3/site-packages/Sire/Qt/__init__.py", line 19, in <module>
    from Sire.Qt._Qt import *
ImportError: libSireStream.so.0: cannot open shared object file: No such file or directory

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
 




Christopher Woods

unread,
Sep 17, 2014, 1:20:26 PM9/17/14
to Sire Developers
Hi Julien,

Yes, you can run the tests one at a time. To do this, just run the
test using $SIRE/bin/python, e.g.

cd $SIRE/test/SireMM
$SIRE/bin/python test_shift.py

(note that many of the tests assume that you are in the same directory
as the test - this is something I should fix by using python to change
directory when the script is run)

The updated sire_test script in the devel and trunk branches has logic
to allow you to run all of the tests in a single directory, e.g.

$SIRE/bin/sire_test SireMM

will run all of the SireMM tests, while

$SIRE/bin/sire_test SireMaths SireBase

will run all of the tests in SireMaths and SireBase. You should be able to write

$SIRE/bin/sire_test Nautilus

to run all of the tests in the Nautilus directory. If not, add this as
a bug report and I will fix sire_test

Cheers,

Christopher

p.s. Sorry for the delay - in conference all day
> --
> You received this message because you are subscribed to the Google Groups
> "Sire Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sire-develope...@googlegroups.com.
> To post to this group, send email to sire-de...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sire-developers.
> For more options, visit https://groups.google.com/d/optout.



--
---------------------------------------------------------
Christopher Woods
+44 (0) 7786 264562
http://chryswoods.com
Reply all
Reply to author
Forward
0 new messages