That seems like a bad scenario with bad technical management. I am wondering if you have considered not trying to implement unit tests and think about end to end tests. This might be easier for antitesting people to buy into because it’s directly ensuring your end users get the desired outcomes.
It doesn’t matter what bad terrible practices you have inside your library if the output is correct…
If you input 1+1, and it outputs 5, it will be obvious how this can be an issue.
What this will enable you to do is get some quick wins and make refactoring safer.
If management still says no, I see 3 major choices.
1. Quit
2. Write your tests and keep them to yourself
3. Mind control