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)

Python dilinin Selenium kütüphanesini kullanarak; Amazon, LinkedIn ve ÇiçekSepeti üzerinde test işlemleri yaptığımız bir case study reposudur.

Python dilinin Selenium kütüphanesini kullanarak; Amazon, LinkedIn ve ÇiçekSepeti üzerinde test işlemleri yaptığımız bir case study reposudur. LinkedI

Furkan Gulsen 8 Nov 01, 2022
Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.

Mimesis - Fake Data Generator Description Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes

Isaak Uchakaev 3.8k Dec 29, 2022
Code for "SUGAR: Subgraph Neural Network with Reinforcement Pooling and Self-Supervised Mutual Information Mechanism"

SUGAR Code for "SUGAR: Subgraph Neural Network with Reinforcement Pooling and Self-Supervised Mutual Information Mechanism" Overview train.py: the cor

41 Nov 08, 2022
This project is used to send a screenshot by email of your MyUMons schedule using Selenium python lib (headless mode)

MyUMonsSchedule Use MyUMonsSchedule python script to send a screenshot by email (Gmail) of your MyUMons schedule. If you use it on Windows, take care

Pierre-Louis D'Agostino 6 May 12, 2022
This repository contnains sample problems with test cases using Cormen-Lib

Cormen Lib Sample Problems Description This repository contnains sample problems with test cases using Cormen-Lib. These problems were made for the pu

Cormen Lib 3 Jun 30, 2022
To automate the generation and validation tests of COSE/CBOR Codes and it's base45/2D Code representations

To automate the generation and validation tests of COSE/CBOR Codes and it's base45/2D Code representations, a lot of data has to be collected to ensure the variance of the tests. This respository was

160 Jul 25, 2022
A Library for Working with Sauce Labs

Robotframework - Sauce Labs Plugin This is a plugin for the SeleniumLibrary to help with using Sauce Labs. This library is a plugin extension of the S

joshin4colours 6 Oct 12, 2021
GitHub action for AppSweep Mobile Application Security Testing

GitHub action for AppSweep can be used to continuously integrate app scanning using AppSweep into your Android app build process

Guardsquare 14 Oct 06, 2022
Browser reload with uvicorn

uvicorn-browser This project is inspired by autoreload. Installation pip install uvicorn-browser Usage Run uvicorn-browser --help to see all options.

Marcelo Trylesinski 64 Dec 17, 2022
Test python asyncio-based code with ease.

aiounittest Info The aiounittest is a helper library to ease of your pain (and boilerplate), when writing a test of the asynchronous code (asyncio). Y

Krzysztof Warunek 55 Oct 30, 2022
A wrapper for webdriver that is a jumping off point for web automation.

Webdriver Automation Plus ===================================== Description: Tests the user can save messages then find them in search and Saved items

1 Nov 08, 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
Given some test cases, this program automatically queries the oracle and tests your Cshanty compiler!

The Diviner A complement to The Oracle for compilers class. Given some test cases, this program automatically queries the oracle and tests your compil

Grant Holmes 2 Jan 29, 2022
Multi-asset backtesting framework. An intuitive API lets analysts try out their strategies right away

Multi-asset backtesting framework. An intuitive API lets analysts try out their strategies right away. Fast execution of profit-take/loss-cut orders is built-in. Seamless with Pandas.

Epymetheus 39 Jan 06, 2023
User-interest mock backend server implemnted using flask restful, and SQLAlchemy ORM confiugred with sqlite

Flask_Restful_SQLAlchemy_server User-interest mock backend server implemnted using flask restful, and SQLAlchemy ORM confiugred with sqlite. Backend b

Austin Weigel 1 Nov 17, 2022
A Simple Unit Test Matcher Library for Python 3

pychoir - Python Test Matchers for humans Super duper low cognitive overhead matching for Python developers reading or writing tests. Implemented in p

Antti Kajander 15 Sep 14, 2022
frwk_51pwn is an open-sourced remote vulnerability testing and proof-of-concept development framework

frwk_51pwn Legal Disclaimer Usage of frwk_51pwn for attacking targets without prior mutual consent is illegal. frwk_51pwn is for security testing purp

51pwn 4 Apr 24, 2022
pytest plugin that let you automate actions and assertions with test metrics reporting executing plain YAML files

pytest-play pytest-play is a codeless, generic, pluggable and extensible automation tool, not necessarily test automation only, based on the fantastic

pytest-dev 67 Dec 01, 2022
catsim - Computerized Adaptive Testing Simulator

catsim - Computerized Adaptive Testing Simulator Quick start catsim is a computerized adaptive testing simulator written in Python 3.4 (with modificat

Nguyễn Văn Anh Tuấn 1 Nov 29, 2021
Spam the buzzer and upgrade automatically - Selenium

CookieClicker Usage: Let's check your chrome navigator version : Consequently, you have to : download the right chromedriver in the follow link : http

Iliam Amara 1 Nov 22, 2021