Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/diffpy/srfit/equation/literals/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Operator(Literal, OperatorABC):
"""Abstract class for specifying a general operator.

This class provides several methods that are common to a derived
classes for concrete concrete operations.
classes for concrete operations.

Class Attributes
----------------
Expand Down
4 changes: 2 additions & 2 deletions tests/testbuilder.py → tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import diffpy.srfit.equation.builder as builder
import diffpy.srfit.equation.literals as literals
from diffpy.srfit.tests.utils import _makeArgs
from diffpy.srfit.tests.utils import noObserversInGlobalBuilders
from .utils import _makeArgs
from .utils import noObserversInGlobalBuilders


class TestBuilder(unittest.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import numpy

from diffpy.srfit.tests.utils import has_sas, _msg_nosas
from .utils import has_sas, _msg_nosas
from diffpy.srfit.sas.sasimport import sasimport

# Global variables to be assigned in setUp
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/testcontribution.py → tests/test_contribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from diffpy.srfit.fitbase.profile import Profile
from diffpy.srfit.fitbase.parameter import Parameter
from diffpy.srfit.exceptions import SrFitError
from diffpy.srfit.tests.utils import noObserversInGlobalBuilders
from .utils import noObserversInGlobalBuilders


class TestContribution(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/testdiffpyparset.py → tests/test_diffpyparset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import numpy

from diffpy.srfit.tests.utils import has_structure, _msg_nostructure
from .utils import has_structure, _msg_nostructure

# Global variables to be assigned in setUp
Atom = Lattice = Structure = DiffpyStructureParSet = None
Expand Down
4 changes: 2 additions & 2 deletions tests/testequation.py → tests/test_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import diffpy.srfit.equation.literals as literals
from diffpy.srfit.equation import Equation
from diffpy.srfit.tests.utils import _makeArgs
from diffpy.srfit.tests.utils import noObserversInGlobalBuilders
from .utils import _makeArgs
from .utils import noObserversInGlobalBuilders


class TestEquation(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/testfitrecipe.py → tests/test_fitrecipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from diffpy.srfit.fitbase.fitcontribution import FitContribution
from diffpy.srfit.fitbase.profile import Profile
from diffpy.srfit.fitbase.parameter import Parameter
from diffpy.srfit.tests.utils import capturestdout
from .utils import capturestdout


class TestFitRecipe(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/testfitresults.py → tests/test_fitresults.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from diffpy.srfit.fitbase.fitrecipe import FitRecipe
from diffpy.srfit.fitbase.fitresults import initializeRecipe
from diffpy.srfit.tests.utils import datafile
from .utils import datafile


class TestInitializeRecipe(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/testliterals.py → tests/test_literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def testAddLiteral(self):
"""Test adding a literal to an operator node."""
op = self.op

self.assertRaises(ValueError, op.getValue)
self.assertRaises(TypeError, op.getValue)
op._value = 1
self.assertEqual(op.getValue(), 1)

Expand All @@ -127,7 +127,7 @@ def testAddLiteral(self):
b = literals.Argument(name = "b", value = 0)

op.addLiteral(a)
self.assertRaises(ValueError, op.getValue)
self.assertRaises(TypeError, op.getValue)

op.addLiteral(b)
self.assertAlmostEqual(0, op.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import numpy

from diffpy.srfit.tests.utils import has_pyobjcryst, _msg_nopyobjcryst
from .utils import has_pyobjcryst, _msg_nopyobjcryst

# Global variables to be assigned in setUp
ObjCrystCrystalParSet = spacegroups = None
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/testpdf.py → tests/test_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

import numpy

from diffpy.srfit.tests.utils import datafile
from diffpy.srfit.tests.utils import has_srreal, _msg_nosrreal
from diffpy.srfit.tests.utils import has_structure, _msg_nostructure
from .utils import datafile
from .utils import has_srreal, _msg_nosrreal
from .utils import has_structure, _msg_nostructure
from diffpy.srfit.pdf import PDFGenerator, PDFParser, PDFContribution
from diffpy.srfit.exceptions import SrFitError

Expand Down
2 changes: 1 addition & 1 deletion tests/testprofile.py → tests/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from diffpy.srfit.fitbase.profile import Profile
from diffpy.srfit.exceptions import SrFitError
from diffpy.srfit.tests.utils import datafile
from .utils import datafile


class TestProfile(unittest.TestCase):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from diffpy.srfit.fitbase.recipeorganizer import equationFromString
from diffpy.srfit.fitbase.recipeorganizer import RecipeContainer
from diffpy.srfit.fitbase.recipeorganizer import RecipeOrganizer
from diffpy.srfit.tests.utils import capturestdout
from .utils import capturestdout

import numpy

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/testsas.py → tests/test_sas.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import numpy

from diffpy.srfit.sas import SASGenerator, SASParser, SASProfile
from diffpy.srfit.tests.utils import datafile
from diffpy.srfit.tests.utils import has_sas, _msg_nosas
from .utils import datafile
from .utils import has_sas, _msg_nosas
from diffpy.srfit.sas.sasimport import sasimport

# ----------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions tests/testsgconstraints.py → tests/test_sgconstraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

import numpy

from diffpy.srfit.tests.utils import datafile
from diffpy.srfit.tests.utils import has_pyobjcryst, _msg_nopyobjcryst
from diffpy.srfit.tests.utils import has_structure, _msg_nostructure
from .utils import datafile
from .utils import has_pyobjcryst, _msg_nopyobjcryst
from .utils import has_structure, _msg_nostructure

# ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion tests/speedtest.py → tests/test_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import diffpy.srfit.equation.visitors as visitors
import diffpy.srfit.equation.literals as literals

from diffpy.srfit.tests.utils import _makeArgs
from .utils import _makeArgs

x = numpy.arange(0, 20, 0.05)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/testvisitors.py → tests/test_visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import diffpy.srfit.equation.visitors as visitors
import diffpy.srfit.equation.literals as literals
from diffpy.srfit.tests.utils import _makeArgs
from .utils import _makeArgs

class TestValidator(unittest.TestCase):

Expand Down Expand Up @@ -194,7 +194,7 @@ def testSimpleFunction(self):
self.assertTrue(plus2.hasObserver(mult._flush))

# plus2 has no arguments yet. Verify this.
self.assertRaises(ValueError, mult.getValue)
self.assertRaises(TypeError, mult.getValue)
# Add the arguments to plus2.
plus2.addLiteral(v4)
plus2.addLiteral(v5)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import diffpy.srfit.equation.literals as literals
from diffpy.srfit.sas.sasimport import sasimport
from diffpy.srfit.tests import logger
from . import logger


# Resolve availability of optional third-party packages.
Expand Down