tests.test_operations

Attributes

p100

p010

p110

p111

x

y

z

sg40_a_tf

sg40_a_tl

sg40_a_m

sg40_a_code

sg40_21_code

sg40_n_code

sg147_m3_code

Classes

TestOperationsInit

A class whose instances are single test cases.

TestSelectedOperations

Define space group #40 'Ama2' operations here to avoid code repetition

TestOperations

Test selected aspects specific to `Operation`s

TestBoundedOperations

Test selected aspects specific to `BoundedOperation`s

TestPointOperations

Test selected aspects specific to `BoundedOperation`s

TestCatalogOperations

Run complete rigorous tests on all operations defined in SG catalog

Module Contents

tests.test_operations.p100
tests.test_operations.p010
tests.test_operations.p110
tests.test_operations.p111
tests.test_operations.x
tests.test_operations.y
tests.test_operations.z
tests.test_operations.sg40_a_tf
tests.test_operations.sg40_a_tl
tests.test_operations.sg40_a_m
tests.test_operations.sg40_a_code = 'x+1/2,-y,z'
tests.test_operations.sg40_21_code = '-x,-y+1/2,z+1/2'
tests.test_operations.sg40_n_code = '-x+1/2,y-1/2,z+1/2'
tests.test_operations.sg147_m3_code = 'x-y,x,-z'
class tests.test_operations.TestOperationsInit(methodName='runTest')[source]

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

test_from_pair()[source]
test_from_code()[source]
test_from_matrix()[source]
class tests.test_operations.TestSelectedOperations(methodName='runTest')[source]

Bases: tests.NumpyTestCase

Define space group #40 ‘Ama2’ operations here to avoid code repetition

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

class tests.test_operations.TestOperations(methodName='runTest')[source]

Bases: TestSelectedOperations

Test selected aspects specific to `Operation`s

test_equals()[source]
test_product()[source]
test_power()[source]
test_inverse()[source]
test_repr()[source]
test_str()[source]
test_hash()[source]
test_code()[source]
test_det()[source]
test_typ()[source]
test_fold()[source]
test_order()[source]
test_glide()[source]
test_trace()[source]
test_orientation()[source]
test_sense()[source]
test_at()[source]
test_into()[source]
test_transform()[source]
test_extincts()[source]
test_distance_to_point()[source]
class tests.test_operations.TestBoundedOperations(methodName='runTest')[source]

Bases: TestSelectedOperations

Test selected aspects specific to `BoundedOperation`s

test_binding()[source]
test_unbinding()[source]
test_is_bounded()[source]
class tests.test_operations.TestPointOperations(methodName='runTest')[source]

Bases: TestSelectedOperations

Test selected aspects specific to `BoundedOperation`s

test_point_restraint()[source]
class tests.test_operations.TestCatalogOperations(methodName='runTest')[source]

Bases: unittest.TestCase

Run complete rigorous tests on all operations defined in SG catalog

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_catalog_names()[source]
test_catalog_fold()[source]
test_catalog_order()[source]
test_catalog_at_origin()[source]
test_catalog_into_orientation()[source]
test_catalog_distance_to_point()[source]