Skip to content

Commit

Permalink
smtbx: remove pytest dependency
Browse files Browse the repository at this point in the history
- Reverts 0f7535f
  • Loading branch information
bkpoon committed Oct 15, 2024
1 parent cab8966 commit 7f77cbf
Show file tree
Hide file tree
Showing 11 changed files with 340 additions and 276 deletions.
4 changes: 0 additions & 4 deletions smtbx/conftest.py

This file was deleted.

258 changes: 0 additions & 258 deletions smtbx/refinement/constraints/tests/test_rigid.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import, division, print_function

def test_direction():
def exercise_direction():
from cctbx.array_family import flex
from cctbx import uctbx, xray, crystal
from smtbx.refinement import constraints
Expand Down Expand Up @@ -44,3 +44,7 @@ def test_direction():
nc = row(v01).cross(row(v21)).normalize()
assert approx_equal(n, n1, eps=1e-15)
assert approx_equal(n, nc, eps=1e-15)

if __name__ == '__main__':
exercise_direction()
print('OK')
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import absolute_import, division, print_function

from six.moves import zip

from six.moves import cStringIO as StringIO

disordered = """
Expand Down Expand Up @@ -67,7 +66,7 @@
HKLF 4
"""

def test_with_disorder():
def exercise_with_disorder():
from iotbx import shelx
from smtbx import refinement
import smtbx.refinement.constraints as core
Expand Down Expand Up @@ -100,3 +99,7 @@ def test_with_disorder():
assert isinstance(params.site, expected_type)
assert ([sc1.label for sc1 in params.site.argument(0).scatterers] ==
[expected_pivot])

if __name__ == '__main__':
exercise_with_disorder()
print('OK')
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
}
"""

def test_simple_disorder():
def exercise_simple_disorder():
ins = fnames.thpp_ins
model = smtbx.refinement.model.from_shelx(ins)
ls = model.least_squares()
Expand All @@ -113,3 +113,7 @@ def test_simple_disorder():
covann.variance_of('C7A.occ'))
assert approx_equal(covann.variance_of('C3.occ'),
covann.variance_of('N3.occ'))

if __name__ == '__main__':
exercise_simple_disorder()
print('OK')
Loading

0 comments on commit 7f77cbf

Please sign in to comment.