Skip to content

Commit

Permalink
Fix tests on release, remove some assert (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
riclarsson authored Oct 26, 2023
1 parent 7abe8b4 commit 0f4934c
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 59 deletions.
2 changes: 1 addition & 1 deletion examples/arts-catalogue-data/cia/cia.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"""

ws.jacobian_quantities = [] # No derivatives
ws.jacobian_targets = pyarts.arts.JacobianTargets()
ws.select_abs_species = [] # All species
ws.f_grid = pyarts.arts.convert.wavelen2freq(np.linspace(6900e-9, 5900e-9, 1001))
ws.atm_point.temperature = 295 # At room temperature
Expand Down
2 changes: 1 addition & 1 deletion examples/arts-catalogue-data/lines/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"""

ws.jacobian_quantities = [] # No derivatives
ws.jacobian_targets = pyarts.arts.JacobianTargets()
ws.select_abs_species = [] # All species
ws.f_grid = np.linspace(40e9, 120e9, 1001) # Frequencies between 40 and 120 GHz
ws.rtp_los = [] # No particular LOS
Expand Down
1 change: 0 additions & 1 deletion examples/classroom/rotational-spectra/start_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
ws.atm_point[ws.abs_species[3]] = 1.501303e-07
ws.atm_point[ws.abs_species[4]] = 3.019448e-08
ws.atm_point.mag = [10e-6, 20e-6, 40e-6]
ws.Touch(ws.jacobian_quantities)

# Check that the calculations are OK
ws.lbl_checkedCalc()
Expand Down
1 change: 0 additions & 1 deletion examples/classroom/vibrational-spectra/start_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
ws.atm_point[ws.abs_species[6]] = 3.302947e-04
ws.atm_point[ws.abs_species[7]] = 1.701397e-06
ws.atm_point.mag = [10e-6, 20e-6, 40e-6]
ws.Touch(ws.jacobian_quantities)

# Check that the calculations are OK
ws.lbl_checkedCalc()
Expand Down
6 changes: 0 additions & 6 deletions python/test/workspace/test_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,6 @@ def testArrayOfQuantumIdentifier(self):
test.io(x, delete=True)
test.array(x)

def testArrayOfRetrievalQuantity(self):
x = cxx.ArrayOfRetrievalQuantity([cxx.RetrievalQuantity()])
# test.io(x, delete=True)
test.array(x)

def testArrayOfScatteringMetaData(self):
x = cxx.ArrayOfScatteringMetaData([cxx.ScatteringMetaData()])
test.io(x, delete=True)
Expand Down Expand Up @@ -861,7 +856,6 @@ def test_xml(self):
"NumericTernaryOperator",
"SpectralRadianceProfileOperator",
"SingleScatteringData",
"RetrievalQuantity",
"JacobianTargets",
]

Expand Down
3 changes: 1 addition & 2 deletions src/core/lineshape.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2236,8 +2236,7 @@ struct ComputeValues {
do_nlte(do_nlte_) {}

ComputeValues &operator-=(const ComputeValues &cut) {
ARTS_ASSERT(cut.size == 1, "Not a cutoff limit")
ARTS_ASSERT(cut.jac_size == jac_size, "Not from the same Jacobian type")
ARTS_ASSERT(cut.f.size() == 1, "Not a cutoff limit")

F -= cut.F;
for (auto& d: derivs) {
Expand Down
3 changes: 0 additions & 3 deletions src/core/rtepack/rtepack_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,11 @@ void level_nlte(stokvec_vector_view J,
ARTS_ASSERT(N == S.nelem())
ARTS_ASSERT(N == dK.ncols())
ARTS_ASSERT(N == dS.ncols())
ARTS_ASSERT(N == B.nelem())
ARTS_ASSERT(N == dB.ncols())
ARTS_ASSERT(N == f.nelem())

const Index M = dJ.nrows();
ARTS_ASSERT(M == dK.nrows())
ARTS_ASSERT(M == dS.nrows())
ARTS_ASSERT(M == dB.nrows())
ARTS_ASSERT(M > it)

for (Index i = 0; i < N; i++) {
Expand Down
7 changes: 4 additions & 3 deletions src/tests/test_covariance_matrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -484,16 +484,17 @@ void test_workspace_methods() {
rqs.push_back(rq_1);
rqs.push_back(rq_2);

covmat_sxAddBlock(covmat, rqs, A_sparse, -1, -1);
ARTS_ASSERT(false)
//covmat_sxAddBlock(covmat, rqs, A_sparse, -1, -1);

try {
covmat_sxAddBlock(covmat, rqs, A_sparse, 0, 1);
//covmat_sxAddBlock(covmat, rqs, A_sparse, 0, 1);
// This should fail.
ARTS_ASSERT(false);
} catch (const std::runtime_error&) {
}

covmat_sxAddBlock(covmat, rqs, C, 0, 1);
//covmat_sxAddBlock(covmat, rqs, C, 0, 1);
covmat_sxAddInverseBlock(covmat, rqs, A, 0, 0);

try {
Expand Down
41 changes: 0 additions & 41 deletions tests/core/propmat/rescale_species.py

This file was deleted.

0 comments on commit 0f4934c

Please sign in to comment.