Skip to content

Commit 59f9471

Browse files
[pre-commit.ci] auto fixes from pre-commit hooks
1 parent 95f2ef1 commit 59f9471

18 files changed

+42
-42
lines changed

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import pytest
66

7-
from diffpy.srreal.structureconverters import convertObjCrystCrystal
87
import diffpy.structure as mod_structure
8+
from diffpy.srreal.structureconverters import convertObjCrystCrystal
99

1010

1111
@pytest.fixture
@@ -37,6 +37,7 @@ def _msg_nopyobjcryst():
3737
def has_pyobjcryst():
3838
try:
3939
import pyobjcryst.crystal
40+
4041
convertObjCrystCrystal(pyobjcryst.crystal.Crystal())
4142
has_pyobjcryst = True
4243
except ImportError:

tests/test_atomradiitable.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55

66
import pickle
77
import unittest
8+
89
import pytest
910

1011
from diffpy.srreal.atomradiitable import AtomRadiiTable, ConstantRadiiTable, CovalentRadiiTable
1112

1213
# ----------------------------------------------------------------------------
1314

15+
1416
class TestAtomRadiiTable(unittest.TestCase):
1517
def setUp(self):
1618
self.rtb = AtomRadiiTable()
@@ -100,6 +102,7 @@ def test_toString(self):
100102

101103
# ----------------------------------------------------------------------------
102104

105+
103106
class TestCovalentRadiiTable(unittest.TestCase):
104107

105108
@pytest.fixture(autouse=True)

tests/test_bondcalculator.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@
55

66
import pickle
77
import unittest
8-
import pytest
98

109
import numpy
10+
import pytest
11+
from testutils import loadDiffPyStructure, loadObjCrystCrystal, pickle_with_attr
1112

1213
from diffpy.srreal.bondcalculator import BondCalculator
13-
from testutils import (
14-
loadDiffPyStructure,
15-
loadObjCrystCrystal,
16-
pickle_with_attr,
17-
)
1814

1915
# ----------------------------------------------------------------------------
2016

@@ -247,6 +243,7 @@ def test_setTypeMask(self):
247243

248244
# ----------------------------------------------------------------------------
249245

246+
250247
class TestBondCalculatorObjCryst(unittest.TestCase):
251248

252249
@pytest.fixture(autouse=True)

tests/test_bvscalculator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
import pickle
77
import unittest
88

9-
from diffpy.srreal.bvscalculator import BVSCalculator
109
from testutils import loadDiffPyStructure, pickle_with_attr
1110

11+
from diffpy.srreal.bvscalculator import BVSCalculator
12+
1213

1314
##############################################################################
1415
class TestBVSCalculator(unittest.TestCase):

tests/test_debyepdfcalculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import unittest
88

99
import numpy
10+
from testutils import _maxNormDiff, loadDiffPyStructure, pickle_with_attr
1011

1112
from diffpy.srreal.pdfcalculator import DebyePDFCalculator, PDFCalculator
12-
from testutils import loadDiffPyStructure, pickle_with_attr, _maxNormDiff
1313

1414

1515
##############################################################################

tests/test_overlapcalculator.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@
66
import copy
77
import pickle
88
import unittest
9-
import pytest
109

1110
import numpy
11+
import pytest
12+
from testutils import loadDiffPyStructure, loadObjCrystCrystal, pickle_with_attr
1213

1314
from diffpy.srreal.atomradiitable import CovalentRadiiTable
1415
from diffpy.srreal.overlapcalculator import OverlapCalculator
15-
from testutils import (
16-
loadDiffPyStructure,
17-
loadObjCrystCrystal,
18-
pickle_with_attr,
19-
)
2016

2117
# ----------------------------------------------------------------------------
2218

@@ -330,6 +326,7 @@ def test_neighborhoods(self):
330326

331327
# ----------------------------------------------------------------------------
332328

329+
333330
class TestOverlapCalculatorObjCryst(unittest.TestCase):
334331

335332
@pytest.fixture(autouse=True)

tests/test_pairquantity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import unittest
77

88
import numpy
9+
from testutils import mod_structure
910

1011
from diffpy.srreal.pairquantity import PairQuantity
1112
from diffpy.srreal.pdfcalculator import PDFCalculator
1213
from diffpy.srreal.srreal_ext import BasePairQuantity
13-
from testutils import mod_structure
1414

1515
# ----------------------------------------------------------------------------
1616

tests/test_parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import unittest
88

99
import numpy
10+
from testutils import loadDiffPyStructure
1011

1112
from diffpy.srreal.parallel import createParallelCalculator
12-
from testutils import loadDiffPyStructure
1313

1414

1515
##############################################################################

tests/test_pdfbaseline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import unittest
88

99
import numpy
10+
from testutils import pickle_with_attr
1011

1112
from diffpy.srreal.pdfbaseline import LinearBaseline, PDFBaseline, ZeroBaseline, makePDFBaseline
1213
from diffpy.srreal.pdfcalculator import PDFCalculator
13-
from testutils import pickle_with_attr
1414

1515
# ----------------------------------------------------------------------------
1616

tests/test_pdfcalcobjcryst.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
import re
77
import unittest
8-
import pytest
98

109
import numpy
10+
import pytest
11+
from testutils import _maxNormDiff, datafile, loadObjCrystCrystal
1112

1213
from diffpy.srreal.pdfcalculator import PDFCalculator
13-
from testutils import datafile, loadObjCrystCrystal, _maxNormDiff
1414

1515
# helper functions
1616

@@ -58,6 +58,7 @@ def _makePDFCalculator(crst, cfgdict):
5858

5959
# ----------------------------------------------------------------------------
6060

61+
6162
class TestPDFCalcObjcryst(unittest.TestCase):
6263

6364
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)