Skip to content

Commit

Permalink
Add TOUGH3 t2listing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
acroucher committed Feb 25, 2020
1 parent 97ad072 commit 305cfc1
Show file tree
Hide file tree
Showing 12 changed files with 3,930 additions and 0 deletions.
543 changes: 543 additions & 0 deletions tests/listing/TOUGH3/1/OUTPUT

Large diffs are not rendered by default.

Binary file added tests/listing/TOUGH3/1/OUTPUT_31_element.npy
Binary file not shown.
1,052 changes: 1,052 additions & 0 deletions tests/listing/TOUGH3/2/OUTPUT

Large diffs are not rendered by default.

Binary file added tests/listing/TOUGH3/2/OUTPUT_20_element.npy
Binary file not shown.
1,034 changes: 1,034 additions & 0 deletions tests/listing/TOUGH3/3/OUTPUT

Large diffs are not rendered by default.

Binary file added tests/listing/TOUGH3/3/OUTPUT_46_connection.npy
Binary file not shown.
Binary file added tests/listing/TOUGH3/3/OUTPUT_46_element.npy
Binary file not shown.
1,236 changes: 1,236 additions & 0 deletions tests/listing/TOUGH3/4/OUTPUT

Large diffs are not rendered by default.

Binary file added tests/listing/TOUGH3/4/OUTPUT_345_connection.npy
Binary file not shown.
Binary file added tests/listing/TOUGH3/4/OUTPUT_345_element.npy
Binary file not shown.
Binary file added tests/listing/TOUGH3/4/OUTPUT_345_generation.npy
Binary file not shown.
65 changes: 65 additions & 0 deletions tests/test_t2listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,71 @@ def test_TOUGHREACT_1(self):

self.listing.close()

#--------------------------------------------------------------------------------
# TOUGH3 tests

def test_TOUGH3_1(self):
"""TOUGH3 case 1 (r1q)"""

self.base = os.path.join('listing', 'TOUGH3', '1', 'OUTPUT')
self.listing = t2listing(self.base)

self.assertEqual(self.listing.simulator, 'TOUGH3')
self.assertEqual(self.listing.num_fulltimes, 1)

self.table_test(31, ['element'])

self.table_spot_test(1, 'element', 'A1 55', 'SAT_G', 0.2133)

self.listing.close()

def test_TOUGH3_2(self):
"""TOUGH3 case 2 (rfp)"""

self.base = os.path.join('listing', 'TOUGH3', '2', 'OUTPUT')
self.listing = t2listing(self.base)

self.assertEqual(self.listing.simulator, 'TOUGH3')
self.assertEqual(self.listing.num_fulltimes, 2)

self.table_test(20, ['element'])

self.table_spot_test(55, 'element', '2CB 1', 'X_CO2_G', 0.6434)

self.listing.close()

def test_TOUGH3_3(self):
"""TOUGH3 case 3 (rvf)"""

self.base = os.path.join('listing', 'TOUGH3', '3', 'OUTPUT')
self.listing = t2listing(self.base)

self.assertEqual(self.listing.simulator, 'TOUGH3')
self.assertEqual(self.listing.num_fulltimes, 1)

self.table_test(46, ['element', 'connection'])

self.table_spot_test(46, 'element', 'A1311', 'TEMP', 190.5)
self.table_spot_test(46, 'connection', ('A1803', 'A1804'), 'FLOW_L', -0.6251)

self.listing.close()

def test_TOUGH3_4(self):
"""TOUGH3 case 4"""

self.base = os.path.join('listing', 'TOUGH3', '4', 'OUTPUT')
self.listing = t2listing(self.base)

self.assertEqual(self.listing.simulator, 'TOUGH3')
self.assertEqual(self.listing.num_fulltimes, 1)

self.table_test(345, ['element', 'connection', 'generation'])

# self.table_spot_test(46, 'element', 'A1311', 'TEMP', 190.5)
# self.table_spot_test(46, 'connection', ('A1803', 'A1804'), 'FLOW_L', -0.6251)

self.listing.close()

#--------------------------------------------------------------------------------

if __name__ == '__main__':
Expand Down

0 comments on commit 305cfc1

Please sign in to comment.