Re: Unit Testing anaconda addons?

Chris Lumens <[email protected]>
Newsgroups gmane.linux.redhat.anaconda.devel
Message-ID <[email protected]>
> git clone https://cdcvs.fnal.gov/projects/scientificlinux-anaconda-context/
> 
> and to run the unit tests
> 
> cd anaconda-context; python org_scientificlinux_contexts/tests
> 
> There is only the one test that errors out.

Okay, threadMgr is only ever initialized when initThreading is called.
The only place that happens in anaconda is in the main anaconda program.
So if your tests don't involve running anaconda (which I don't imagine
they do), then threadMgr will always be set to None.

You could call initThreading yourself, but pay attention to the big fat
warning comment in that function.

Perhaps a better approach is seeing if your tests actually require the
GUI parts of anaconda and then handling the exception either in your
test or in your code.

I am having trouble running it right now - loads of the wrong versions
of stuff, likely because you are using a RHEL7 derived distribution and
I've got some horrible rawhide-like thing installed.

- Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.