Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up formerly nose tests (setup -> setup_method) #169

Open
mcepl opened this issue Dec 7, 2023 · 0 comments
Open

Clean up formerly nose tests (setup -> setup_method) #169

mcepl opened this issue Dec 7, 2023 · 0 comments

Comments

@mcepl
Copy link

mcepl commented Dec 7, 2023

I think there are some remnants of nose in the test code:

 $ qd
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -2,7 +2,7 @@ import sys, os
 
 # In order to test the Flask-Script command, Flask-Script needs to be
 # installed. If this is the case, we won't be able to import from our
-# local src/flaskext directory that nose puts on sys.path, due to the
+# local src/flaskext directory that pytest puts on sys.path, due to the
 # way Flask extensions employ pkg_resources to have multiple directories
 # contribute to the same module. We fix it by manually adding the
 # directory to an already existing virtual flaskext module.
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -22,7 +22,7 @@ class TestConfigAppBound:
     """The extension is bound to a specific app.
     """
 
-    def setup(self):
+    def setup_method(self):
         self.app = Flask(__name__)
         self.env = Environment(self.app)
 
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -26,8 +26,8 @@ class TestUrlAndDirectory(TempEnvironmen
     Let's test the different scenarios to ensure everything works.
     """
 
-    def setup(self):
-        TempEnvironmentHelper.setup(self)
+    def setup_method(self):
+        TempEnvironmentHelper.setup_method(self)
 
         self.app = Flask(__name__, static_url_path='/app_static')
         from tests import test_module
@@ -152,7 +152,7 @@ class TestUrlAndDirectoryWithInitApp(obj
     values also work if the application is initialized via "init_app()".
     """
 
-    def setup(self):
+    def setup_method(self):
         self.app = Flask(__name__, static_url_path='/initapp_static')
         self.env = Environment()
         self.env.init_app(self.app)
 $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant