import numpy
from trussme import truss
from trussme import old_truss
import unittest


class TestSequenceFunctions(unittest.TestCase):

    def setUp(self):
        self.T = truss.Truss()
        self.Tr = old_truss.Truss(6)

    def test_joints(self):
        self.T.add_support(numpy.array([-5.0, 0.0, 0.0]), d=2)
        self.T.add_joint(  numpy.array([-2.0, 0.0, 0.0]), d=2)
        self.T.add_support(numpy.array([ 1.0, 0.0, 0.0]), d=2)
        self.T.joints[2].roller()
        self.T.add_joint(  numpy.array([ 3.0, 0.0, 0.0]), d=2)
        self.T.add_support(numpy.array([ 5.0, 0.0, 0.0]), d=2)
        self.T.add_support(numpy.array([ 1.0, 1.0, 0.0]), d=2)

        self.T.add_member(0, 1)
        self.T.add_member(1, 2)
        self.T.add_member(2, 3)
        self.T.add_member(3, 4)
        self.T.add_member(0, 5)
        self.T.add_member(1, 5)
        self.T.add_member(2, 5)
        self.T.add_member(3, 5)
        self.T.add_member(4, 5)
        
        self.T.fos_eval()
        self.T2.truss_eval()

        # self.T.print_report()

if __name__ == "__main__":
    unittest.main()

import numpy
from trussme import truss
from trussme import old_truss
import unittest


class TestSequenceFunctions(unittest.TestCase):

    def setUp(self):
        self.T = truss.Truss()
        self.Tr = old_truss.Truss(6)

    def test_joints(self):
        self.T.add_support(numpy.array([-5.0, 0.0, 0.0]), d=2)
        self.T.add_joint(  numpy.array([-2.0, 0.0, 0.0]), d=2)
        self.T.add_support(numpy.array([ 1.0, 0.0, 0.0]), d=2)
        self.T.joints[2].roller()
        self.T.add_joint(  numpy.array([ 3.0, 0.0, 0.0]), d=2)
        self.T.add_support(numpy.array([ 5.0, 0.0, 0.0]), d=2)
        self.T.add_support(numpy.array([ 1.0, 1.0, 0.0]), d=2)

        self.T.add_member(0, 1)
        self.T.add_member(1, 2)
        self.T.add_member(2, 3)
        self.T.add_member(3, 4)
        self.T.add_member(0, 5)
        self.T.add_member(1, 5)
        self.T.add_member(2, 5)
        self.T.add_member(3, 5)
        self.T.add_member(4, 5)
        
        self.T.calc_fos()
        self.T2.truss_eval()

        # self.T.print_report()

if __name__ == "__main__":
    unittest.main()

Update test_simple.py