Roundup Tracker - Issues

Message7164

Author rouilj
Recipients rouilj, schlatterbeck
Date 2021-04-01.13:18:54
Message-id <20210401131850.28A746A01DA@pe15.cs.umb.edu>
In-reply-to <1617260479.14.0.562086382424.issue2551125@roundup.psfhosted.org>
Hi Ralf:

In message <1617260479.14.0.562086382424.issue2551125@roundup.psfhosted.org>,
Ralf Schlatterbeck writes:
>Ralf Schlatterbeck added the comment:
>
>I've pushed a fix, hope this is ok what I did.

Yup, that is exactly the right fix. xapian._xapian needed to be a
string. I didn't notice it in testing since my test platforms have
xapian installed/defined.

>Note that I *think* removing modules from sys.modules might affect
>following tests, as the loaded modules are probably no longer available?

If I delete a module/key from sys.modules[] the next import will put
it back.  If I define the value of the module as None, the next import
will raise an ImportError.

The only import of xapian in roundup/configuration.py is within the
validator() method that is under test. So a deletion of the xapian
symbols from the sys.modules dict will be re-defined by the import
xapian statement in validator(). Defining the xapian symbol as None
before a call to import xapian will result in an ImportError
exception.

If the 'import xapian' was done at the module or class level in
configuration.py, you would be correct. I would need to do the delete
followed by an import xapian in the test to restore the module.

Also I have been running with pytest random-order to looks for order
dependencies (as would happen if the issue you raise was true) just
and haven't found any in about 100 runs.

I am considering adding it to the ci test so postgres/mysql also get
tested, but I test sqlite so I get most of the rdbms code tested.

Have a great week and thanks for the fix. I'll close this issue.
History
Date User Action Args
2021-04-01 13:18:55rouiljsetrecipients: + schlatterbeck
2021-04-01 13:18:55rouiljlinkissue2551125 messages
2021-04-01 13:18:54rouiljcreate