Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/integration/test_integration_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_plot(self, analysis, flavour, n):
n_rot = 0
if flavour == 'cplx':
cplx = True
if flavour == 'varmx':
elif flavour == 'varmx':

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_plot refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
if analysis == 'uni':
model = MCA(self.A)
Expand Down
18 changes: 8 additions & 10 deletions tests/integration/test_integration_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_getter(self, analysis, n, scaling, phase_shift, rotated):
n_rot = 0
if analysis == 'cplx':
cplx = True
if analysis == 'varmx':
elif analysis == 'varmx':

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_getter refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
model = xMCA(self.A, self.B)
model.solve(complexify=cplx)
Expand All @@ -247,7 +247,7 @@ def test_hom_het_patterns(self, analysis):
n_rot = 0
if analysis == 'cplx':
cplx = True
if analysis == 'varmx':
elif analysis == 'varmx':

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_hom_het_patterns refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
model = xMCA(self.A, self.B)
model.solve(complexify=cplx)
Expand All @@ -272,7 +272,7 @@ def test_field(self, analysis):
n_rot = 0
if analysis == 'cplx':
cplx = True
if analysis == 'varmx':
elif analysis == 'varmx':

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_field refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
model = xMCA(self.A, self.B)
model.solve(complexify=cplx)
Expand All @@ -295,7 +295,7 @@ def test_field_scaling(self, analysis):
n_rot = 0
if analysis == 'cplx':
cplx = True
if analysis == 'varmx':
elif analysis == 'varmx':

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_field_scaling refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
model = xMCA(self.A, self.B)
result1 = model.fields(original_scale=True)
Expand Down Expand Up @@ -333,7 +333,7 @@ def test_plot(self, analysis, flavour, n):
n_rot = 0
if flavour == 'cplx':
cplx = True
if flavour == 'varmx':
elif flavour == 'varmx':

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_plot refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
if analysis == 'uni':
model = xMCA(self.A)
Expand Down Expand Up @@ -465,7 +465,7 @@ def test_truncate(self, analysis, flavour, trunc):
n_rot = 0
if flavour == 'cplx':
cplx = True
if flavour == 'varmx':
elif flavour == 'varmx':

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_truncate refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
if analysis == 'uni':
model = xMCA(self.A)
Expand All @@ -483,9 +483,7 @@ def test_truncate(self, analysis, flavour, trunc):

def test_apply_weights(self):
model = xMCA(self.A, self.B)
weights = {}
weights['left'] = self.A.coords['lat']
weights['right'] = self.B.coords['lat']
weights = {'left': self.A.coords['lat'], 'right': self.B.coords['lat']}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_apply_weights refactored with the following changes:

model.apply_weights(**weights)

def test_complex_solver(self):
Expand Down Expand Up @@ -538,7 +536,7 @@ def test_significance_methods(
n_rot = 0
if flavour == 'cplx':
cplx = True
if flavour == 'varmx':
elif flavour == 'varmx':
Comment on lines -541 to +539

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function TestIntegration.test_significance_methods refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

n_rot = 10
if analysis == 'uni':
model = xMCA(self.A)
Expand Down
Loading