Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Move tests dir and use testutils
  • Loading branch information
bobleesj committed Sep 25, 2024
commit 5369f6ae66b3c2f37b964cb3ec0cf37a1423e5e9
2 changes: 1 addition & 1 deletion requirements/run.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy < 2.0.0 # Need to fix deprecations before 2.0.0 compat
numpy
wxpython
diffpy.pdffit2
diffpy.structure
Expand Down
80 changes: 0 additions & 80 deletions src/diffpy/pdfgui/tests/__init__.py

This file was deleted.

19 changes: 0 additions & 19 deletions src/diffpy/pdfgui/tests/conftest.py

This file was deleted.

36 changes: 0 additions & 36 deletions src/diffpy/pdfgui/tests/debug.py

This file was deleted.

38 changes: 0 additions & 38 deletions src/diffpy/pdfgui/tests/run.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import unittest

import wx

import pytest
from diffpy.pdfgui.gui import aboutdialog
from diffpy.pdfgui.tests.testutils import GUITestCase, overridewebbrowser
from testutils import GUITestCase, overridewebbrowser

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

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

class TestDialogAbout(GUITestCase):
def setUp(self):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import wx

from diffpy.pdfgui.gui.mainframe import MainFrame
from diffpy.pdfgui.tests.testutils import GUITestCase, datafile, tooltiptext
from testutils import GUITestCase, datafile, tooltiptext

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import wx

from diffpy.pdfgui.gui.dopingseriespanel import DopingSeriesPanel
from diffpy.pdfgui.tests.testutils import GUITestCase, datafile, overridefiledialog
from testutils import GUITestCase, datafile, overridefiledialog

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from diffpy.pdfgui.control.plotter import Plotter
from diffpy.pdfgui.gui import extendedplotframe as epf
from diffpy.pdfgui.gui.extendedplotframe import ExtendedPlotFrame
from diffpy.pdfgui.tests.testutils import GUITestCase, overridefiledialog
from testutils import GUITestCase, overridefiledialog

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import diffpy.pdfgui.control.fitdataset as fds
from diffpy.pdfgui.control.fitdataset import FitDataSet
from diffpy.pdfgui.tests.testutils import datafile
from testutils import datafile

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from diffpy.pdfgui.control.controlerrors import ControlTypeError
from diffpy.pdfgui.control.fitstructure import FitStructure
from diffpy.pdfgui.control.pdfstructure import PDFStructure
from diffpy.pdfgui.tests.testutils import datafile
from testutils import datafile
from diffpy.structure import Structure

# ----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import wx

from diffpy.pdfgui.gui.insertrowsdialog import InsertRowsDialog
from diffpy.pdfgui.tests.testutils import GUITestCase
from testutils import GUITestCase

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import unittest

from diffpy.pdfgui.control.controlerrors import ControlFileError
from diffpy.pdfgui.tests.testutils import GUITestCase, datafile
from testutils import GUITestCase, datafile
from diffpy.pdfgui.tui import LoadProject

# ----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import wx

from diffpy.pdfgui.gui.mainframe import MainFrame
from diffpy.pdfgui.tests.testutils import GUITestCase
from testutils import GUITestCase

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from diffpy.pdfgui.control.controlerrors import ControlKeyError, ControlTypeError
from diffpy.pdfgui.control.parameter import Parameter
from diffpy.pdfgui.gui.mainframe import MainFrame
from diffpy.pdfgui.tests.testutils import GUITestCase, datafile
from testutils import GUITestCase, datafile

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from diffpy.pdfgui.control.parameter import Parameter
from diffpy.pdfgui.gui.parameterspanel import ParametersPanel
from diffpy.pdfgui.tests.testutils import GUITestCase, clickcell
from testutils import GUITestCase, clickcell

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import unittest

from diffpy.pdfgui.control.pdfdataset import PDFDataSet
from diffpy.pdfgui.tests.testutils import datafile
from testutils import datafile


##############################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from diffpy.pdfgui.control.controlerrors import ControlFileError, ControlKeyError
from diffpy.pdfgui.control.pdfstructure import PDFStructure
from diffpy.pdfgui.tests.testutils import datafile
from testutils import datafile

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from diffpy.pdfgui.gui.mainframe import MainFrame
from diffpy.pdfgui.gui.phaseconfigurepanel import PhaseConfigurePanel
from diffpy.pdfgui.tests.testutils import GUITestCase, clickcell, datafile, overrideclipboard, tooltiptext
from testutils import GUITestCase, clickcell, datafile, overrideclipboard, tooltiptext

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from diffpy.pdfgui.control.controlerrors import ControlConfigError
from diffpy.pdfgui.control.structureviewer import StructureViewer, getStructureViewer
from diffpy.pdfgui.tests.testutils import datafile
from testutils import datafile


##############################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import wx

from diffpy.pdfgui.gui.temperatureseriespanel import TemperatureSeriesPanel
from diffpy.pdfgui.tests.testutils import GUITestCase, datafile, overridefiledialog
from testutils import GUITestCase, datafile, overridefiledialog

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

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions src/diffpy/pdfgui/tests/testutils.py → tests/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import os
from contextlib import contextmanager
from unittest import TestCase

import wx

from diffpy.pdfgui.control import pdfguicontrol
Expand All @@ -34,7 +33,6 @@ def datafile(filename):
rv = str(files(__name__).joinpath("testdata", filename))
return rv


@contextmanager
def overridewebbrowser(fnc_open):
"Temporarily replace `webbrowser.open` with given function."
Expand Down