Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completed tests rearrangement #812

Merged
merged 1 commit into from
Jul 26, 2024
Merged

completed tests rearrangement #812

merged 1 commit into from
Jul 26, 2024

Conversation

zerothi
Copy link
Owner

@zerothi zerothi commented Jul 26, 2024

Now all tests are following the structure
proposed in zerothi/sisl-files#14.

It means complete output storage, and
cherry-picks for the files to be tested.

This of course meant a huge restructuring of tests since tests had to be redone, re-arranged etc.

In particular, we have changed the tbtrans test
to be much smaller, and hence that particular
test is much faster!

Now all tests are following the structure
proposed in sisl-files #14.

It means complete output storage, and
cherry-picks for the files to be tested.

This of course meant a huge restructuring of tests
since tests had to be redone, re-arranged etc.

In particular, we have changed the tbtrans test
to be much smaller, and hence that particular
test is much faster!

Signed-off-by: Nick Papior <[email protected]>
@zerothi zerothi merged commit bd02f59 into main Jul 26, 2024
3 checks passed
@zerothi zerothi deleted the tests-rearrange branch July 26, 2024 20:11
assert orb_left[d1, d2.T].sum() == pytest.approx(-orb_left[d2, d1.T].sum())
assert orb_right[d2, d1.T].sum() == pytest.approx(tbt.transmission(right, left)[E])
assert orb_right[d2, d1.T].sum() == pytest.approx(-orb_right[d1, d2.T].sum())
d1 = geom.a2o(range(6, 12), all=True).reshape(-1, 1)

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable d1 is not used.
assert orb_right[d2, d1.T].sum() == pytest.approx(tbt.transmission(right, left)[E])
assert orb_right[d2, d1.T].sum() == pytest.approx(-orb_right[d1, d2.T].sum())
d1 = geom.a2o(range(6, 12), all=True).reshape(-1, 1)
d2 = geom.a2o(range(12, 18), all=True).reshape(-1, 1)

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable d2 is not used.


def test_si_ion_xml_handle(sisl_files):
f = open(sisl_files(_dir, "Si.ion.xml"), "r")
f = open(sisl_files("siesta", "Si_pdos_k", "Si.ion.xml"), "r")

Check warning

Code scanning / CodeQL

File is not always closed Warning test

File is opened but is not closed.


def test_si_ion_xml_stringio(sisl_files):
f = StringIO(open(sisl_files(_dir, "Si.ion.xml"), "r").read())
f = StringIO(open(sisl_files("siesta", "Si_pdos_k", "Si.ion.xml"), "r").read())

Check warning

Code scanning / CodeQL

File is not always closed Warning test

File is opened but is not closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant