示例#1
0
 def test_geom_barrel_culvert(self):
     """Predefined shapes with Geoms, Barrel and culvert"""
     test_text = r"""Culvert      	CIRCULAR    	3            	0         	0         	0         	2         	4"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(match(actual_text, test_text), msg)
示例#2
0
 def test_geom_barrel(self):
     """Predefined shapes with Geoms and Barrel only"""
     test_text = r"""C1   TRAPEZOIDAL  3                5          5          5          1"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(match(actual_text, test_text), msg)
示例#3
0
 def test_custom_curve(self):
     """CUSTOM with Curve only"""
     test_text = r"""W1   CUSTOM    1.0  Curve1"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(match(actual_text, test_text), msg)
示例#4
0
 def test_geom(self):
     """Predefined shapes with Geoms only"""
     test_text = r"""W1   RECT_OPEN    2.83             1.75       0          0"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(match(actual_text, test_text), msg)
示例#5
0
 def test_custom_curve_barrelnum(self):
     """CUSTOM with Curve and number of barrels"""
     # -- Failed because the optional number of Barrels are not read
     test_text = r"""W1   CUSTOM    1.0  Curve1  0  0  1"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(match(actual_text, test_text), msg)
示例#6
0
 def test_irregular_tsectnum(self):
     """IRREGULAR with Tsect number, example 7"""
     # -- Failed with the IRREGULAR in Example 7
     # -- However, example 7 input is not consistent with SWIM5.1 input
     test_text = r"""C_Aux1       IRREGULAR    Full_Street      3          5          5          1"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(match(actual_text, test_text), msg)
示例#7
0
 def test_custom_curve(self):
     """CUSTOM with Curve only"""
     test_text = r"""W1   CUSTOM    1.0  Curve1"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(
         match_keyword_lines(test_text,
                             actual_text,
                             keywords_=None,
                             skipped_keywords=None,
                             ignore_trailing_0=True), msg)
示例#8
0
 def test_geom(self):
     """Predefined shapes with Geoms only"""
     test_text = r"""W1   RECT_OPEN    2.83             1.75       0          0"""
     my_options = CrossSectionReader.read(test_text)
     actual_text = CrossSectionWriter.as_text(my_options)
     msg = '\nSet:' + test_text + '\nGet:' + actual_text
     self.assertTrue(
         match_keyword_lines(test_text,
                             actual_text,
                             keywords_=None,
                             skipped_keywords=None,
                             ignore_trailing_0=True), msg)