old_contents: 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.T2 = 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.T2.truss_eval()
          self.T.calc_fos()
  
          # self.T.print_report()
  
  if __name__ == "__main__":
      unittest.main()
  
new_contents: 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.T2 = old_truss.Truss(12)
  
      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.T2.truss_eval()
          self.T.calc_fos()
  
          # self.T.print_report()
  
  if __name__ == "__main__":
      unittest.main()
  
subject: Update test_simple.py