Commit aa1153f2 authored by Adam P. Goucher's avatar Adam P. Goucher

Bugfix

parent e6251be1
Pipeline #54488970 passed with stages
in 7 minutes and 23 seconds
#ifndef LIFELIB_VERSION /* #ifndef LIFELIB_VERSION /*
__version__=[x.replace('"', '') for x in ''' __version__=[x.replace('"', '') for x in '''
*/ */
#define LIFELIB_VERSION "ll2.2.4" #define LIFELIB_VERSION "ll2.2.5"
// '''.split() if ('ll' in x)][0][2:] // '''.split() if ('ll' in x)][0][2:]
#endif #endif
...@@ -25,6 +25,7 @@ class Lifetree(object): ...@@ -25,6 +25,7 @@ class Lifetree(object):
def load(self, filename, compressed='deduce', tempfile='tempfile'): def load(self, filename, compressed='deduce', tempfile='tempfile'):
filename = os.path.abspath(filename) filename = os.path.abspath(filename)
tempfile = os.path.abspath(tempfile)
if not os.path.isfile(filename): if not os.path.isfile(filename):
raise OSError("%s does not exist or is not a regular file" % filename) raise OSError("%s does not exist or is not a regular file" % filename)
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
import unittest import unittest
import lifelib.genera.rulefiles.parsetable as parsetable import lifelib.genera.rulefiles.parsetable as parsetable
from lifelib.genera import sanirule
class TestPerm(unittest.TestCase): class TestPerm(unittest.TestCase):
def test_permute(self): def test_permute(self):
...@@ -9,5 +11,9 @@ class TestPerm(unittest.TestCase): ...@@ -9,5 +11,9 @@ class TestPerm(unittest.TestCase):
generators = parsetable.permute_symmetry(parsetable.nhoods['Moore']) generators = parsetable.permute_symmetry(parsetable.nhoods['Moore'])
self.assertEqual(generators, [[(1, 2, 3, 4, 5, 6, 7, 8)], [(1, 2)]]) self.assertEqual(generators, [[(1, 2, 3, 4, 5, 6, 7, 8)], [(1, 2)]])
def test_sanirule(self):
self.assertEqual(sanirule('B3/S23'), 'b3s23')
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment