| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e173eff commit 43d83a1
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,23 @@ | |||
| 1 | + **Added:** | ||
| 2 | + | ||
| 3 | + * Added `diffpy.structure` back to the requirements and run the test | ||
| 4 | + | ||
| 5 | + **Changed:** | ||
| 6 | + | ||
| 7 | + * <news item> | ||
| 8 | + | ||
| 9 | + **Deprecated:** | ||
| 10 | + | ||
| 11 | + * <news item> | ||
| 12 | + | ||
| 13 | + **Removed:** | ||
| 14 | + | ||
| 15 | + * <news item> | ||
| 16 | + | ||
| 17 | + **Fixed:** | ||
| 18 | + | ||
| 19 | + * <news item> | ||
| 20 | + | ||
| 21 | + **Security:** | ||
| 22 | + | ||
| 23 | + * <news item> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,3 +3,4 @@ numpy | |||
| 3 | 3 | scipy | |
| 4 | 4 | bg-mpl-stylesheets | |
| 5 | 5 | diffpy.utils | |
| 6 | + diffpy.structure | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,3 +3,4 @@ numpy | |||
| 3 | 3 | scipy | |
| 4 | 4 | bg-mpl-stylesheets | |
| 5 | 5 | diffpy.utils | |
| 6 | + diffpy.structure | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,3 +13,6 @@ | |||
| 13 | 13 | # See LICENSE.rst for license information. | |
| 14 | 14 | # | |
| 15 | 15 | ############################################################################## | |
| 16 | + from pkgutil import extend_path | ||
| 17 | + | ||
| 18 | + __path__ = extend_path(__path__, __name__) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,11 +73,6 @@ def sas_available(): | |||
| 73 | 73 | return has_sas() | |
| 74 | 74 | ||
| 75 | 75 | ||
| 76 | - @pytest.fixture(scope="session") | ||
| 77 | - def diffpy_structure_available(): | ||
| 78 | - return has_diffpy_structure() | ||
| 79 | - | ||
| 80 | - | ||
| 81 | 76 | @pytest.fixture(scope="session") | |
| 82 | 77 | def diffpy_srreal_available(): | |
| 83 | 78 | return has_diffpy_srreal() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,15 +18,12 @@ | |||
| 18 | 18 | import unittest | |
| 19 | 19 | ||
| 20 | 20 | import numpy as np | |
| 21 | - import pytest | ||
| 22 | 21 | ||
| 23 | 22 | from diffpy.srfit.structure.diffpyparset import DiffpyStructureParSet | |
| 24 | 23 | ||
| 25 | 24 | ||
| 26 | - def testDiffpyStructureParSet(diffpy_structure_available): | ||
| 25 | + def testDiffpyStructureParSet(): | ||
| 27 | 26 | """Test the structure conversion.""" | |
| 28 | - if not diffpy_structure_available: | ||
| 29 | - pytest.skip("diffpy.structure package not available") | ||
| 30 | 27 | from diffpy.structure import Atom, Lattice, Structure | |
| 31 | 28 | ||
| 32 | 29 | a1 = Atom("Cu", xyz=np.array([0.0, 0.1, 0.2]), Uisoequiv=0.003) | |
@@ -103,10 +100,8 @@ def _testLattice(): | |||
| 103 | 100 | return | |
| 104 | 101 | ||
| 105 | 102 | ||
| 106 | - def test___repr__(diffpy_structure_available): | ||
| 103 | + def test___repr__(): | ||
| 107 | 104 | """Test representation of DiffpyStructureParSet objects.""" | |
| 108 | - if not diffpy_structure_available: | ||
| 109 | - pytest.skip("diffpy.structure package not available") | ||
| 110 | 105 | from diffpy.structure import Atom, Lattice, Structure | |
| 111 | 106 | ||
| 112 | 107 | lat = Lattice(3, 3, 2, 90, 90, 90) | |
@@ -119,10 +114,8 @@ def test___repr__(diffpy_structure_available): | |||
| 119 | 114 | return | |
| 120 | 115 | ||
| 121 | 116 | ||
| 122 | - def test_pickling(diffpy_structure_available): | ||
| 117 | + def test_pickling(): | ||
| 123 | 118 | """Test pickling of DiffpyStructureParSet.""" | |
| 124 | - if not diffpy_structure_available: | ||
| 125 | - pytest.skip("diffpy.structure package not available") | ||
| 126 | 119 | from diffpy.structure import Atom, Structure | |
| 127 | 120 | ||
| 128 | 121 | stru = Structure([Atom("C", [0, 0.2, 0.5])]) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -140,11 +140,7 @@ def testParser2(datafile): | |||
| 140 | 140 | return | |
| 141 | 141 | ||
| 142 | 142 | ||
| 143 | - def testGenerator( | ||
| 144 | - diffpy_srreal_available, diffpy_structure_available, datafile | ||
| 145 | - ): | ||
| 146 | - if not diffpy_structure_available: | ||
| 147 | - pytest.skip("diffpy.structure package not available") | ||
| 143 | + def testGenerator(diffpy_srreal_available, datafile): | ||
| 148 | 144 | if not diffpy_srreal_available: | |
| 149 | 145 | pytest.skip("diffpy.srreal package not available") | |
| 150 | 146 | ||
@@ -200,7 +196,7 @@ def testGenerator( | |||
| 200 | 196 | return | |
| 201 | 197 | ||
| 202 | 198 | ||
| 203 | - def test_setQmin(diffpy_structure_available, diffpy_srreal_available): | ||
| 199 | + def test_setQmin(diffpy_srreal_available): | ||
| 204 | 200 | """Verify qmin is propagated to the calculator object.""" | |
| 205 | 201 | if not diffpy_srreal_available: | |
| 206 | 202 | pytest.skip("diffpy.srreal package not available") | |
@@ -214,10 +210,8 @@ def test_setQmin(diffpy_structure_available, diffpy_srreal_available): | |||
| 214 | 210 | return | |
| 215 | 211 | ||
| 216 | 212 | ||
| 217 | - def test_setQmax(diffpy_structure_available, diffpy_srreal_available): | ||
| 213 | + def test_setQmax(diffpy_srreal_available): | ||
| 218 | 214 | """Check PDFContribution.setQmax()""" | |
| 219 | - if not diffpy_structure_available: | ||
| 220 | - pytest.skip("diffpy.structure package not available") | ||
| 221 | 215 | from diffpy.structure import Structure | |
| 222 | 216 | ||
| 223 | 217 | if not diffpy_srreal_available: | |
@@ -233,10 +227,8 @@ def test_setQmax(diffpy_structure_available, diffpy_srreal_available): | |||
| 233 | 227 | return | |
| 234 | 228 | ||
| 235 | 229 | ||
| 236 | - def test_getQmax(diffpy_structure_available, diffpy_srreal_available): | ||
| 230 | + def test_getQmax(diffpy_srreal_available): | ||
| 237 | 231 | """Check PDFContribution.getQmax()""" | |
| 238 | - if not diffpy_structure_available: | ||
| 239 | - pytest.skip("diffpy.structure package not available") | ||
| 240 | 232 | from diffpy.structure import Structure | |
| 241 | 233 | ||
| 242 | 234 | if not diffpy_srreal_available: | |
@@ -260,12 +252,8 @@ def test_getQmax(diffpy_structure_available, diffpy_srreal_available): | |||
| 260 | 252 | return | |
| 261 | 253 | ||
| 262 | 254 | ||
| 263 | - def test_savetxt( | ||
| 264 | - diffpy_structure_available, diffpy_srreal_available, datafile | ||
| 265 | - ): | ||
| 255 | + def test_savetxt(diffpy_srreal_available, datafile): | ||
| 266 | 256 | "check PDFContribution.savetxt()" | |
| 267 | - if not diffpy_structure_available: | ||
| 268 | - pytest.skip("diffpy.structure package not available") | ||
| 269 | 257 | from diffpy.structure import Structure | |
| 270 | 258 | ||
| 271 | 259 | if not diffpy_srreal_available: | |
@@ -286,12 +274,8 @@ def test_savetxt( | |||
| 286 | 274 | return | |
| 287 | 275 | ||
| 288 | 276 | ||
| 289 | - def test_pickling( | ||
| 290 | - diffpy_structure_available, diffpy_srreal_available, datafile | ||
| 291 | - ): | ||
| 277 | + def test_pickling(diffpy_srreal_available, datafile): | ||
| 292 | 278 | "validate PDFContribution.residual() after pickling." | |
| 293 | - if not diffpy_structure_available: | ||
| 294 | - pytest.skip("diffpy.structure package not available") | ||
| 295 | 279 | from diffpy.structure import loadStructure | |
| 296 | 280 | ||
| 297 | 281 | if not diffpy_srreal_available: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments