annotate .hgsigs @ 6218:790aeeddcab5

tests: fix assertion rewriting in some tests with pytest-3.0.0+ Since pytest 3.0.0, asserts present in modules that are not directly seen by pytest as 'test modules', are no longer rewritten to have improved reporting, unless they are explicitly marked as up-for-rewriting. Rationale from pytest upstream: However since we do not want to test different bytecode then you will run in production this hook only re-writes test modules themselves as well as any modules which are part of plugins. Any other imported module will not be re-written and normal assertion behaviour will happen. This is e.g. the case for asserts in files like kallithea/tests/api/api_base.py and kallithea/tests/models/common.py. See http://doc.pytest.org/en/latest/changelog.html#id13 http://doc.pytest.org/en/latest/writing_plugins.html#assertion-rewriting This commit registers all modules below kallithea.tests for assert rewriting, but note that asserts in kallithea/tests/__init__.py itself are not rewritten as kallithea.tests is already imported when the register statement is encountered. Moving the register statement to kallithea/__init__.py would fix that, but even then asserts in kallithea/tests/__init__.py seem not to be rewritten (let alone the issue that we do not want a pytest dependency enforced in kallithea/__init__.py which is also used in production). Moving the code from kallithea/tests/__init__.py to a proper module, as suggested by Mads Kiilerich, solves that problem.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Fri, 09 Sep 2016 15:34:08 +0200
parents f40905c3257c
children 9b9258f5e2b2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5529
1c9c3b0f21ae Added tag 0.3 for changeset 9b3e9e242f5c
Andrew Shadura <andrew@shadura.me>
parents:
diff changeset
1 9b3e9e242f5c97cc0c7657e5ac93dce7de61ca16 0 iQEcBAABAgAGBQJWDuAdAAoJEJ1bI/kYT6UUAlYH/ReCa7Im5tvy+ot5oAc7xey/O2rCVHp2h6i82tTWK/0i9EaS4DP+eTbAjV4WJA4qWF5DPenEJ3X9JhrTLNvGkR0f7lUqiFVMTJ472YlSsvIWg38gVFruzwk1cODRfq72o8ERYcRSfzrL4cDpIqjEd/vVVCV/gKVvPmzr4/FED/ZmS0X6T9gxWJo/eWSuLNAxHHtE/pCWDO3XEe+iOm+hHjkyz4Hn2r9/+ucrirnzycH6DnYO/kWvQzBnzgMjJm+1rLZ5cfU89V8zfhv6z0pd8CHZfpKGc2Z8EwVJq9LR+M4/76uDlYXx7IfZAxhRNqN6MC+yvPmDo3382dNr7Wkopi0=
5757
c92b6787c843 Added tag 0.3.1 for changeset 9bf8eb837e78
Andrew Shadura <andrew@shadura.me>
parents: 5529
diff changeset
2 9bf8eb837e785b6856ccfac264e977ce3ebe1535 0 iQEcBAABAgAGBQJW5XaVAAoJEJ1bI/kYT6UUbeMH/AsGg21jTc0tTT+228T+WfrfkbxrPkkULQF/Eo3ChlrhnFZ5B1y7ellSx6XGas7yKpqHHtNmrVwY3KBfUaYEljML/osEt1kvM6JGcd0vDbAW1uA2sdJR2AXmf32MjguFVhmYi9Lj79WYtgg241YGPe4dH0ompNFVqazNxCfmDBZijzSkF57FURMpV2e6+MyNq0txSo9Q82eALy0GAIX7NKQcxtynxG9ETzVzuVpeNE9MEZh0ObbUtPGezd55GXXcVqI8ZEurZwf6KHnd5M+5wxIZf84gM/k4QgQbRiIxNj4QfVmTZlVNSkC7PwSbF8twZPjlAprwldYvMi/c7ZVocEY=
5813
f40905c3257c Added tag 0.3.2 for changeset a84d40e9481f
Andrew Shadura <andrew@shadura.me>
parents: 5757
diff changeset
3 a84d40e9481fcea4dafadee86b03f0dd401527d6 0 iQEcBAABAgAGBQJXJ4XhAAoJEJ1bI/kYT6UUKaIH/i33ZiT95pWF3pHEftgrZWvMwvz9tAuoHgf7ntkIUPnxfNteXKw8FiKcSQ9f8I41VyML+rqsnBBIfltJknfoqTV+9jNkHwc62OfcqQ3RbBDXQbcSi1CHn2ihJiZadqiKEyUw7JJqOMyWp+AWQyywcF/ea+pwXPJG5A2fd4vnBWHSxhD+6Ig1KipZNORzZY7fAec185M7NOZCZC+5qOLIkoQZaGq+D2Aipx5eZkpgFd4W+0LQY1ywMV5CiOY1OG0mry7l6NfIZvPY9Kiwg37G6ZUi8fhwVvn6Y8UACcAnWunBfKt9PWK0rAgNyJ9HDk/+3S5g6HcNKUb6YRTzEcLshIc=