From tanner at real-time.com Sun Dec 29 12:40:54 2019 From: tanner at real-time.com (Bob Tanner) Date: Sun, 29 Dec 2019 18:40:54 +0000 Subject: [crossfire] Using Mock Object patch autospec with plugins/cfpython? Message-ID: Been validating the maps/python code for python3 compliancy and started to do some unit testing and ran into a problem. I surmise the Crossfire object I need to import, comes from server/plugins/cfpython directory? Though I do not find how this code “works” and gives me a python package to import. I see several of the maps/python scripts import this package, example maps/python/casion/diamondslots.py import Crossfire import CFGamble import CFItemBroker Normally, I’d create a Mock Object for the Crossfire package something like this: @patch(‘Crossfire', autospec=True) def test_WhoAmI(self, mock_Crossfire): pass I’ve never tried to autospec a package that is created from C code. Am I way off base here? Is there a “traditional” Crossfire package somewhere and I’m just missing it? — Bob Tanner | Phone : (952)943-8700 https://keybase.io/basictheprogram | http://www.real-time.com Key fingerprint = F785 DDFC CF94 7CE8 AA87 3A9D 3895 26F1 0DDB E378