Django test runner using nose

Related tags

Testingdjango-nose
Overview

django-nose

The PyPI package GitHub Actions Coverage Jazzband

django-nose provides all the goodness of nose in your Django tests, like:

  • Testing just your apps by default, not all the standard ones that happen to be in INSTALLED_APPS
  • Running the tests in one or more specific modules (or apps, or classes, or folders, or just running a specific test)
  • Obviating the need to import all your tests into tests/__init__.py. This not only saves busy-work but also eliminates the possibility of accidentally shadowing test classes.
  • Taking advantage of all the useful nose plugins

It also provides:

  • Fixture bundling, an optional feature which speeds up your fixture-based tests by a factor of 4
  • Reuse of previously created test DBs, cutting 10 seconds off startup time
  • Hygienic TransactionTestCases, which can save you a DB flush per test
  • Support for various databases. Tested with MySQL, PostgreSQL, and SQLite. Others should work as well.

django-nose requires nose 1.2.1 or later, and the latest release is recommended. It follows the Django's support policy, supporting:

  • Django 1.8 (LTS) with Python 3.5
  • Django 1.9 with Python 3.5
  • Django 1.10 with Python 3.5
  • Django 1.11 (LTS) with Python 3.5 or 3.6
  • Django 2.0 with Python 3.5, 3.6, or 3.7
  • Django 2.1 with Python 3.5, 3.6, or 3.7
  • Django 2.2 with Python 3.5, 3.6, or 3.7

Note to users

nose has been in maintenance mode since at least 2015. django-nose is in maintenance mode as well, and the sole maintainer is no longer an active user. See Jazzband.co to learn how django-nose is maintained and how you can help. New projects should consider using pytest, or unittest with the Django testing framework.

Installation

You can get django-nose from PyPI with... :

$ pip install django-nose

The development version can be installed with... :

$ pip install -e git://github.com/jazzband/django-nose.git#egg=django-nose

Since django-nose extends Django's built-in test command, you should add it to your INSTALLED_APPS in settings.py:

INSTALLED_APPS = (
    ...
    'django_nose',
    ...
)

Then set TEST_RUNNER in settings.py:

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

Development

Code: https://github.com/jazzband/django-nose
Issues: https://github.com/jazzband/django-nose/issues?state=open
Docs: https://django-nose.readthedocs.io
Comments
  • builds broken for latest django (1.8)

    builds broken for latest django (1.8)

    The trunk builds are broken because of django/[email protected]

    The option parser was changed to argparse, and an optparse compatability layer was introduced. I don't believe the hackety way of "option renaming" can be done as it is right now.

    See: https://github.com/django-nose/django-nose/blob/bfeb0983cce5d78c88a6099057a746c795574fa3/django_nose/runner.py#L102

    opened by conrado 47
  • Merge nose options into Django 1.8 argparse-based options

    Merge nose options into Django 1.8 argparse-based options

    When django.core.management.base.BaseCommand includes 'use_argparse', then nose's optparse options are merged using argparse's parser.add_argument in BaseCommand's overriden add_arguments method.

    For Django 1.7 and earlier, the current .options method is used to set the options.

    Fixes #178. Includes #194, to prove it works on Django 1.8. Replaces #195.

    opened by jwhitlock 14
  • Release 1.4

    Release 1.4

    A 1.4 release is needed for Django 1.8 compatibility.

    Includes PRs

    • #185 - Django 1.8 compatibility
    • #188 - Add contribute.json
    • #187 - Support --testrunner
    • #194 - Add 1.8 to test matrix
    • #196 - Convert nose optparse options to argparse

    Any other PRs that should be included?

    opened by jwhitlock 13
  • parses long options with no equals sign incorrectly

    parses long options with no equals sign incorrectly

    Python's optparse accepts long options also without the equals sign (e.g. --verbose 2). Django-nose fails to strip out the values of such Django options when creating the nose command line:

    $ ./manage.py test --verbosity 0
    ======================================================================
    ERROR: Failure: OSError (No such file /home/akaihola/testproject/0)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/lib/pymodules/python2.6/nose/failure.py", line 39, in runTest
        raise self.exc_class(self.exc_val)
    OSError: No such file /home/akaihola/testproject/0
    
    ----------------------------------------------------------------------
    Ran 20 tests in 2.844s
    
    FAILED (errors=1)
    

    To solve this "correctly", some serious hacking with optparse is probably needed. Or, known Django options with arguments could be handled specially.

    Or maybe it would be possible to "merge" Django's and nose's option parsers?

    bug 
    opened by akaihola 13
  • Django legacy transaction management deprecated

    Django legacy transaction management deprecated

    As of March 21, 2014, some legacy transaction management features in the Django project have been deprecated and removed from the project: django/[email protected].

    I have a Makefile with the following (among other things):

    COMMON_REQUIREMENTS_FILE = arcadia/config/environments/common/requirements.txt
    
    DEVELOPMENT_REQUIREMENTS_FILE = arcadia/config/environments/development/requirements.txt
    
    TESTING_DATABASE_NAME = test_arcadia
    TESTING_DATABASE_OWNER = arcadia
    TESTING_SETTINGS_FILE = arcadia.config.environments.testing.settings
    
    test:
    REUSE_DB=1 python manage.py test --settings $(TESTING_SETTINGS_FILE)
    
    test-clean:
        sudo su - postgres -c 'psql -c "DROP DATABASE IF EXISTS $(TESTING_DATABASE_NAME);"'
        sudo su - postgres -c 'psql -c "CREATE DATABASE $(TESTING_DATABASE_NAME) WITH OWNER $(TESTING_DATABASE_OWNER);"'
        pip install -r $(COMMON_REQUIREMENTS_FILE)
        pip install -r $(DEVELOPMENT_REQUIREMENTS_FILE)
        python manage.py makemigrations --settings $(TESTING_SETTINGS_FILE)
        python manage.py migrate --settings $(TESTING_SETTINGS_FILE)
        REUSE_DB=1 python manage.py test --settings $(TESTING_SETTINGS_FILE)
    

    Running make test-clean produces the following:

    sudo su - postgres -c 'psql -c "DROP DATABASE IF EXISTS test_arcadia;"'
    NOTICE:  database "test_arcadia" does not exist, skipping
    DROP DATABASE
    sudo su - postgres -c 'psql -c "CREATE DATABASE test_arcadia WITH OWNER arcadia;"'
    CREATE DATABASE
    pip install -r arcadia/config/environments/common/requirements.txt
    Requirement already satisfied (use --upgrade to upgrade): Django==1.8 i /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from -r arcadia/config/environments/common/requirements.txt (line 1))
    Requirement already satisfied (use --upgrade to upgrade): psycopg2==2.6 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from -r arcadia/config/environments/common/requirements.txt (line 2))
    Requirement already satisfied (use --upgrade to upgrade): django-compressor==1.4 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from -r arcadia/config/environments/common/requirements.txt (line 3))
    Requirement already satisfied (use --upgrade to upgrade): django-appconf>=0.4 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from django-compressor==1.4->-r arcadia/config/environments/common/requirements.txt (line 3))
    Requirement already satisfied (use --upgrade to upgrade): six in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from django-appconf>=0.4->django-compressor==1.4->-r arcadia/config/environments/common/requirements.txt (line 3))
    pip install -r arcadia/config/environments/development/requirements.txt
    Obtaining file:///home/james/workspace/django-nose (from -r arcadia/config/environments/development/requirements.txt (line 5))
    Requirement already satisfied (use --upgrade to upgrade): django-debug-toolbar==1.3.0 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from -r arcadia/config/environments/development/requirements.txt (line 1))
    Requirement already satisfied (use --upgrade to upgrade): django-extensions==1.5.2 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from -r arcadia/config/environments/development/requirements.txt (line 2))
    Requirement already satisfied (use --upgrade to upgrade): nose==1.3.6 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from -r arcadia/config/environments/development/requirements.txt (line 3))
    Requirement already satisfied (use --upgrade to upgrade): Django>=1.4 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from django-nose==1.3->-r arcadia/config/environments/development/requirements.txt (line 5))
    Requirement already satisfied (use --upgrade to upgrade): sqlparse in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from django-debug-toolbar==1.3.0->-r arcadia/config/environments/development/requirements.txt (line 1))
    Requirement already satisfied (use --upgrade to upgrade): six>=1.2 in /home/james/.virtualenvs/arcadia/lib/python2.7/site-packages (from django-extensions==1.5.2->-r arcadia/config/environments/development/requirements.txt (line 2))
    Installing collected packages: django-nose
      Running setup.py develop for django-nose
    Successfully installed django-nose-1.3
    python manage.py makemigrations --settings arcadia.config.environments.testing.settings
    No changes detected
    python manage.py migrate --settings arcadia.config.environments.testing.settings
    Operations to perform:
      Synchronize unmigrated apps: members, staticfiles, messages, compressor, authentication,     django_nose
      Apply all migrations: admin, contenttypes, sites, auth, sessions
    Synchronizing apps without migrations:
      Creating tables...
        Running deferred SQL...
      Installing custom SQL...
    Running migrations:
      No migrations to apply.
    REUSE_DB=1 python manage.py test --settings arcadia.config.environments.testing.settings nosetests --verbosity=1
    Traceback (most recent call last):
      File "manage.py", line 10, in <module>
        execute_from_command_line(sys.argv)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
        utility.execute()
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
        super(Command, self).run_from_argv(argv)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
        self.execute(*args, **cmd_options)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
        super(Command, self).execute(*args, **options)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
        output = self.handle(*args, **options)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
        failures = test_runner.run_tests(test_labels)
      File "/home/james/workspace/django-nose/django_nose/runner.py", line 349, in run_tests
        result = self.run_suite(nose_argv)
      File "/home/james/workspace/django-nose/django_nose/runner.py", line 296, in run_suite
        addplugins=plugins_to_add)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/core.py", line 121, in __init__
    **extra_args)
      File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
        self.runTests()
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/core.py", line 207, in runTests
        result = self.testRunner.run(self.test)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/core.py", line 50, in run
        wrapper = self.config.plugins.prepareTest(test)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
        return self.call(*arg, **kw)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/plugins/manager.py", line 167, in simple
        result = meth(*arg, **kw)
      File "/home/james/workspace/django-nose/django_nose/plugin.py", line 76, in prepareTest
        self.old_names = self.runner.setup_databases()
      File "/home/james/workspace/django-nose/django_nose/runner.py", line 521, in setup_databases
        transaction.commit_unless_managed(using=connection.alias)
    AttributeError: 'module' object has no attribute 'commit_unless_managed'
    make: *** [test-clean] Error 1
    

    Running make test produces the same error:

    REUSE_DB=1 python manage.py test --settings arcadia.config.environments.testing.settings nosetests --verbosity=1
    Traceback (most recent call last):
      File "manage.py", line 10, in <module>
        execute_from_command_line(sys.argv)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
        utility.execute()
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
        super(Command, self).run_from_argv(argv)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
        self.execute(*args, **cmd_options)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute
        super(Command, self).execute(*args, **options)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
        output = self.handle(*args, **options)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 90, in handle
        failures = test_runner.run_tests(test_labels)
      File "/home/james/workspace/django-nose/django_nose/runner.py", line 349, in run_tests
        result = self.run_suite(nose_argv)
      File "/home/james/workspace/django-nose/django_nose/runner.py", line 296, in run_suite
        addplugins=plugins_to_add)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/core.py", line 121, in __init__
    **extra_args)
      File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
        self.runTests()
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/core.py", line 207, in runTests
        result = self.testRunner.run(self.test)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/core.py", line 50, in run
        wrapper = self.config.plugins.prepareTest(test)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
        return self.call(*arg, **kw)
      File "/home/james/.virtualenvs/arcadia/local/lib/python2.7/site-packages/nose/plugins/manager.py", line 167, in simple
        result = meth(*arg, **kw)
      File "/home/james/workspace/django-nose/django_nose/plugin.py", line 76, in prepareTest
        self.old_names = self.runner.setup_databases()
      File "/home/james/workspace/django-nose/django_nose/runner.py", line 521, in setup_databases
        transaction.commit_unless_managed(using=connection.alias)
    AttributeError: 'module' object has no attribute 'commit_unless_managed'
    make: *** [test] Error 1
    

    This error doesn't occur after I remove sudo su - postgres -c 'psql -c "CREATE DATABASE $(TESTING_DATABASE_NAME) WITH OWNER $(TESTING_DATABASE_OWNER); from test-clean, but make test still causes it to happen.

    Running python manage.py test --settings arcadia.config.environments.testing.settings from the command line also solves the problem.

    Here is the offending line of code: django_nose/runner.py#L404.

    Please let me know if I can provide anything else that is helpful.

    bug 
    opened by jamesbrewerdev 12
  • (Django v1.5) confirm method removed from BaseDatabaseFeatures

    (Django v1.5) confirm method removed from BaseDatabaseFeatures

    Hello!

    On Django trunk, cached properties now keep track of database features like transaction support (https://github.com/django/django/commit/aa423575e7b464433fcfc4bf4b8e1d7627b17ce6).

    Because the confirm method was removed, attempting to run django-nose tests with REUSE_DB=1 generates an obscure 'SkipDatabaseCreation' object has no attribute '_rollback_works' AttributeError.

    See patch for workaround. And thanks for your work on django-nose!

    opened by dvelyk 12
  • Reset sequences only for tables that exists.

    Reset sequences only for tables that exists.

    If using multiple databases setup we need to make sure we aren't trying to reset sequences that doesn't exists in particular DB.

    I've faced problem with using REUSE_DB=1 with multidb setup. The problem was that NoseTestSuiteRunner.setup_databases() was trying to execute reset statements for all the models on every connection. My patch adds a check that the model's table is present in DB before executing reset statement.

    opened by shacka 12
  • selecting tests by attributes does not seem to work

    selecting tests by attributes does not seem to work

    If I specify an attribute via -a or --attr, no tests are run.

    If I set NOSE_ATTR, it seems to work, but I can't specify multiple attributes to limit the tests to ones which have all attributes. E.g., NOSE_ATTR='scope=local,hostname' seems to run all tests which have either a scope attribute of local, or a hostname attribute, not both. It's possible I'm not setting NOSE_ATTR correctly, however, as I've never needed to use it before.

    We're using django-nose 1.2, nose 1.3, and python 2.6. In our non-django projects, we're able to limit tests this way without issue.

    Expected outcome: Tests can be selected using attributes as per the documentation.

    bug 
    opened by shalonwood 11
  • Python 3 fixes

    Python 3 fixes

    Makes django-nose Django1.5/Python3 compatible. Includes some changes automatically made by 2to3 that are not required for Python2 but don't hurt either (assuming only Python >= 2.6 compatibility is required). This way it's not necessary to run 2to3 on the codebase.

    opened by jonashaag 11
  • Tests are not starting to run after upgrading to django nose 1.4 on Django 1.8 and nose 1.3.6

    Tests are not starting to run after upgrading to django nose 1.4 on Django 1.8 and nose 1.3.6

    Following is the exception I get on running REUSE_DB=1 ./manage.py test -s

    Traceback (most recent call last):
      File "./manage.py", line 21, in <module>
        execute_from_command_line(sys.argv)
      File "/usr/local/opt/pyenv/versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
        utility.execute()
      File "/usr/local/opt/pyenv/versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/usr/local/opt/pyenv/versions/2.7/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
        super(Command, self).run_from_argv(argv)
      File "/usr/local/opt/pyenv/versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 378, in run_from_argv
        parser = self.create_parser(argv[0], argv[1])
      File "/usr/local/opt/pyenv/versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 351, in create_parser
        self.add_arguments(parser)
      File "/usr/local/opt/pyenv/versions/2.7/lib/python2.7/site-packages/django/core/management/commands/test.py", line 62, in add_arguments
        test_runner_class.add_arguments(parser)
      File "/Users/antonyr/projects/office/pa_web/src/django-nose/django_nose/runner.py", line 250, in add_arguments
        value = cls._argparse_type[value]
    KeyError: 'choice'
    

    Thanks in advance for the help.

    bug 
    opened by aamirtharaj-rpx 10
  • Assertions

    Assertions

    Hi!

    If I remember correctly, I tried to get these asserts merged a long time ago, but the README.rst file wasn't updated. I did something about that, and maybe you could either pull this or let me know what need to be done to get it in.

    Thanks!

    opened by mjtorn 10
  • Bump wheel from 0.29.0 to 0.38.1

    Bump wheel from 0.29.0 to 0.38.1

    Bumps wheel from 0.29.0 to 0.38.1.

    Changelog

    Sourced from wheel's changelog.

    Release Notes

    UNRELEASED

    • Updated vendored packaging to 22.0

    0.38.4 (2022-11-09)

    • Fixed PKG-INFO conversion in bdist_wheel mangling UTF-8 header values in METADATA (PR by Anderson Bravalheri)

    0.38.3 (2022-11-08)

    • Fixed install failure when used with --no-binary, reported on Ubuntu 20.04, by removing setup_requires from setup.cfg

    0.38.2 (2022-11-05)

    • Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with multiple platform tags

    0.38.1 (2022-11-04)

    • Removed install dependency on setuptools
    • The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was faulty. Fixed so that future changes in the SOABI will not change the tag.

    0.38.0 (2022-10-21)

    • Dropped support for Python < 3.7
    • Updated vendored packaging to 21.3
    • Replaced all uses of distutils with setuptools
    • The handling of license_files (including glob patterns and default values) is now delegated to setuptools>=57.0.0 (#466). The package dependencies were updated to reflect this change.
    • Fixed potential DoS attack via the WHEEL_INFO_RE regular expression
    • Fixed ValueError: ZIP does not support timestamps before 1980 when using SOURCE_DATE_EPOCH=0 or when on-disk timestamps are earlier than 1980-01-01. Such timestamps are now changed to the minimum value before packaging.

    0.37.1 (2021-12-22)

    • Fixed wheel pack duplicating the WHEEL contents when the build number has changed (#415)
    • Fixed parsing of file names containing commas in RECORD (PR by Hood Chatham)

    0.37.0 (2021-08-09)

    • Added official Python 3.10 support
    • Updated vendored packaging library to v20.9

    ... (truncated)

    Commits
    • 6f1608d Created a new release
    • cf8f5ef Moved news item from PR #484 to its proper place
    • 9ec2016 Removed install dependency on setuptools (#483)
    • 747e1f6 Fixed PyPy SOABI parsing (#484)
    • 7627548 [pre-commit.ci] pre-commit autoupdate (#480)
    • 7b9e8e1 Test on Python 3.11 final
    • a04dfef Updated the pypi-publish action
    • 94bb62c Fixed docs not building due to code style changes
    • d635664 Updated the codecov action to the latest version
    • fcb94cd Updated version to match the release
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Maintainers Needed

    Maintainers Needed

    This project continues to have active users, but it does not have active maintainers. If you are a user of this project, please consider becoming a maintainer. It is a natural extension of maintaining your own projects, you'll ensure your own tool is up-to-date now and in the future, and you'll gain skills that will help for future open- and closed-source work.

    I expect to have some free time in the next two months, until the second week of January 2023. If someone (ideally two or more people) want to learn project maintenance, I'll be available to mentor and assist during this period. Some of my goals are:

    • A 2.0 release, as specified on #311
    • Adopting Jazzband release standards, like setuptools_scm and auto-releases
    • Expanding the tests to look more like the Django test suite, with multiple projects focused on different feature sets.

    If you are interested, let me know in the comments, and read the guides at jazzband.co.

    opened by jwhitlock 1
  • Python 3.11 support

    Python 3.11 support

    I had to patch nose for django 2.2 on python 3.11 -

    # patch for nose (django-nose) for py3.11
    import collections
    collections.Callable = collections.abc.Callable
    # End of patch
    

    collections.Callable has a new location.

    opened by radzhome 0
  • Django 3.1: TypeError: sql_flush() takes 3 positional arguments but 4 were given

    Django 3.1: TypeError: sql_flush() takes 3 positional arguments but 4 were given

    Hi!

    After upgrade from Django 3.0 to 3.1, running my tests using django-nose gives me this exception:

    REUSE_DB=1 nosetests mypackage --with-fixture-bundling --with-parallel --with-xunit --verbosity=1
    
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/django/core/management/commands/test.py", line 53, in handle
        failures = test_runner.run_tests(test_labels)
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/django_nose/runner.py", line 308, in run_tests
        result = self.run_suite(nose_argv)
      File "~/Repos/myrepo/test_utils/nose/__init__.py", line 52, in run_suite
        return super(MyNoseRunner, self).run_suite(nose_argv)
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/django_nose/runner.py", line 244, in run_suite
        nose.core.TestProgram(argv=nose_argv, exit=False,
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/nose/core.py", line 118, in __init__
        unittest.TestProgram.__init__(
      File "~/.pyenv/versions/3.9.11/lib/python3.9/unittest/main.py", line 101, in __init__
        self.runTests()
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/nose/core.py", line 207, in runTests
        result = self.testRunner.run(self.test)
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/nose/core.py", line 50, in run
        wrapper = self.config.plugins.prepareTest(test)
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/nose/plugins/manager.py", line 99, in __call__
        return self.call(*arg, **kw)
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/nose/plugins/manager.py", line 167, in simple
        result = meth(*arg, **kw)
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/django_nose/plugin.py", line 82, in prepareTest
        self.old_names = self.runner.setup_databases()
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/django_nose/runner.py", line 466, in setup_databases
        reset_statements = _mysql_reset_sequences(
      File "~/.virtualenvs/web-django31/lib/python3.9/site-packages/django_nose/runner.py", line 405, in _mysql_reset_sequences
        flush_statements = connection.ops.sql_flush(
    TypeError: sql_flush() takes 3 positional arguments but 4 were given
    

    The implementation of MyNoseRunner:

    import re
    from django_nose import NoseTestSuiteRunner
    
    
    class MyNoseRunner(NoseTestSuiteRunner):
        def run_suite(self, nose_argv):
            stack = traceback.extract_stack()
            running_with_pycharm = any([re.findall('[Pp]y[cC]harm|pydev', str(item)) for item in stack])
    
            if running_with_pycharm:
                print('Apply PyCharm fix...\n')
                nose_argv[1] = convert_test_uri_to_nose_pattern(nose_argv[1])
    
            return super(MyNoseRunner, self).run_suite(nose_argv)
    

    The versions of my local environment:

    
    macOS Monterey 12.4
    Apple M1
    
    Python 3.9.11
    
    Django==3.1.14
    django-nose==1.4.7
    nose==1.3.7
    nose-parallel==0.4.0
    

    I've found an issue on other repo and there is:

    probably because the signature for sql_flush has changed (also in https://docs.djangoproject.com/en/3.1/releases/3.1/#backwards-incompatible-changes-in-3-1).
    
    Compare
    https://github.com/django/django/blob/3.0.9/django/db/backends/base/operations.py#L384
    vs
    https://github.com/django/django/blob/3.1/django/db/backends/base/operations.py#L392
    

    Thanks.

    opened by jklemm 0
  • Bump ipython from 5.4.1 to 7.16.3

    Bump ipython from 5.4.1 to 7.16.3

    Bumps ipython from 5.4.1 to 7.16.3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
Releases(v1.4.7)
  • v1.4.7(Aug 20, 2020)

  • v1.4.6(Oct 3, 2018)

  • v1.4.5(Aug 22, 2017)

  • v1.4.4(Jun 27, 2016)

  • v1.4.3(Dec 28, 2015)

    • Add Django 1.9 support
    • Support long options without equals signs, such as "--attr selected"
    • Support nose plugins using callback options
    • Support nose options without default values (@jsatt)
    • Remove Django from install dependencies, to avoid accidental upgrades (@jsocol, @willkg)
    • Setting REUSE_DB to an empty value now disables REUSE_DB, instead of enabling it (@wdoekes)
    Source code(tar.gz)
    Source code(zip)
  • v1.4.2(Oct 7, 2015)

    • Warn against using REUSE_DB=1 and FastFixtureTestCase in docs
    • REUSE_DB=1 uses new transaction management in Django 1.7, 1.8 (@scottsexton)
    • Try to avoid accidentally using production database with REUSE_DB=1 (@alexjg, @eroninjapan)
    • Supported Django versions limited to current supported Django version 1.4, 1.7, and 1.8, as well as relevant Python versions.
    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Oct 7, 2015)

    • Fix version number (@ezarowny)
    • Fix choice options, unbreaking nose-cover (@aamirtharaj-rpx, @jwhitlock)
    • Support 1.8 app loading system (@dgladkov)
    • Support non-ASCII file names (@singingwolfboy)
    • Better PEP8'd assertion names (@roganov)
    Source code(tar.gz)
    Source code(zip)
  • v1.4(Oct 7, 2015)

pywinauto is a set of python modules to automate the Microsoft Windows GUI

pywinauto is a set of python modules to automate the Microsoft Windows GUI. At its simplest it allows you to send mouse and keyboard actions to windows dialogs and controls, but it has support for mo

3.8k Jan 06, 2023
Tools for test driven data-wrangling and data validation.

datatest: Test driven data-wrangling and data validation Datatest helps to speed up and formalize data-wrangling and data validation tasks. It impleme

269 Dec 16, 2022
Webscreener is a tool for mass web domains pentesting.

Webscreener is a tool for mass web domains pentesting. It is used to take snapshots for domains that is generated by a tool like knockpy or Sublist3r. It cuts out most of the pentesting time by scree

Seekurity 3 Jun 07, 2021
This package is a python library with tools for the Molecular Simulation - Software Gromos.

This package is a python library with tools for the Molecular Simulation - Software Gromos. It allows you to easily set up, manage and analyze simulations in python.

14 Sep 28, 2022
Data-Driven Tests for Python Unittest

DDT (Data-Driven Tests) allows you to multiply one test case by running it with different test data, and make it appear as multiple test cases. Instal

424 Nov 28, 2022
Generate random test credit card numbers for testing, validation and/or verification purposes.

Generate random test credit card numbers for testing, validation and/or verification purposes.

Dark Hunter 141 5 Nov 14, 2022
API mocking with Python.

apyr apyr (all lowercase) is a simple & easy to use mock API server. It's great for front-end development when your API is not ready, or when you are

Umut Seven 55 Nov 25, 2022
Test utility for validating OpenAPI documentation

DRF OpenAPI Tester This is a test utility to validate DRF Test Responses against OpenAPI 2 and 3 schema. It has built-in support for: OpenAPI 2/3 yaml

snok 103 Dec 21, 2022
XSSearch - A comprehensive reflected XSS tool built on selenium framework in python

XSSearch A Comprehensive Reflected XSS Scanner XSSearch is a comprehensive refle

Sathyaprakash Sahoo 49 Oct 18, 2022
Plugin for generating HTML reports for pytest results

pytest-html pytest-html is a plugin for pytest that generates a HTML report for test results. Resources Documentation Release Notes Issue Tracker Code

pytest-dev 548 Dec 28, 2022
Connexion-faker - Auto-generate mocks from your Connexion API using OpenAPI

Connexion Faker Get Started Install With poetry: poetry add connexion-faker # a

Erle Carrara 6 Dec 19, 2022
Python Webscraping using Selenium

Web Scraping with Python and Selenium The code shows how to do web scraping using Python and Selenium. We use as data the https://sbot.org.br/localize

Luís Miguel Massih Pereira 1 Dec 01, 2021
A library to make concurrent selenium tests that automatically download and setup webdrivers

AutoParaSelenium A library to make parallel selenium tests that automatically download and setup webdrivers Usage Installation pip install autoparasel

Ronak Badhe 8 Mar 13, 2022
A library for generating fake data and populating database tables.

Knockoff Factory A library for generating mock data and creating database fixtures that can be used for unit testing. Table of content Installation Ch

Nike Inc. 30 Sep 23, 2022
Fi - A simple Python 3.9+ command-line application for managing Fidelity portfolios

fi fi is a simple Python 3.9+ command-line application for managing Fidelity por

Darik Harter 2 Feb 26, 2022
Getting the most out of your hobby servo

ServoProject by Adam Bäckström Getting the most out of your hobby servo Theory The control system of a regular hobby servo looks something like this:

209 Dec 20, 2022
Just for testing video streaming using pytgcalls.

tgvc-video-tests Just for testing video streaming using pytgcalls. Note: The features used in this repository is highly experimental and you might not

wrench 34 Dec 27, 2022
Cloint India Pvt. Ltd's (ClointFusion) Pythonic RPA (Automation) Platform

Welcome to , Made in India with ❤️ Description Cloint India Pvt. Ltd - Python functions for Robotic Process Automation shortly RPA. What is ClointFusi

Cloint India Pvt. Ltd 31 Apr 12, 2022
FFPuppet is a Python module that automates browser process related tasks to aid in fuzzing

FFPuppet FFPuppet is a Python module that automates browser process related tasks to aid in fuzzing. Happy bug hunting! Are you fuzzing the browser? G

Mozilla Fuzzing Security 24 Oct 25, 2022
A twitter bot that simply replies with a beautiful screenshot of the tweet, powered by poet.so

Poet this! Replies with a beautiful screenshot of the tweet, powered by poet.so Installation git clone https://github.com/dhravya/poet-this.git cd po

Dhravya Shah 30 Dec 04, 2022