-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi @BjornFJohansson,
This test is making some other new tests fail by reloading dseqrecord. Reloading the module means that isinstance fails when checking if something is a Dseqrecord as it is comparing the previous class with the reloaded class. What does it test and could it be tested in a way that does not do this?
Otherwise I can just make it reload the affected module again.
pydna/tests/test_module_dseqrecord.py
Lines 49 to 68 in 1099f0a
| def test_IPython_missing(monkeypatch): | |
| import IPython | |
| from pydna import dseqrecord | |
| # assert dseqrecord._display is IPython.display.display | |
| assert dseqrecord._display_html == IPython.display.display_html | |
| import sys | |
| import copy | |
| fakesysmodules = copy.copy(sys.modules) | |
| fakesysmodules["IPython.display"] = None | |
| monkeypatch.delitem(sys.modules, "IPython.display") | |
| monkeypatch.setattr("sys.modules", fakesysmodules) | |
| from importlib import reload | |
| reload(dseqrecord) | |
| from pydna import dseqrecord | |
| assert dseqrecord._display_html("item") == "item" | |
| # assert dseqrecord._HTML("item") == "item" |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels