diff --git a/fire/helputils_test.py b/fire/helputils_test.py index 4bc8acc9..3076d606 100644 --- a/fire/helputils_test.py +++ b/fire/helputils_test.py @@ -21,6 +21,7 @@ import six import unittest +import os class HelpUtilsTest(unittest.TestCase): @@ -120,7 +121,7 @@ def testHelpClassNoInit(self): self.assertIn('Type: type\n', helpstring) self.assertIn('String form: ', helpstring) self.assertIn('fire.test_components.OldStyleEmpty', helpstring) - self.assertIn('fire/test_components.py\n', helpstring) + self.assertIn(os.path.join('fire', 'test_components.py'), helpstring) self.assertIn('Line: ', helpstring) diff --git a/fire/inspectutils_test.py b/fire/inspectutils_test.py index 16ab98cf..db7825dd 100644 --- a/fire/inspectutils_test.py +++ b/fire/inspectutils_test.py @@ -18,6 +18,7 @@ import unittest import six +import os from fire import inspectutils from fire import test_components as tc @@ -97,7 +98,7 @@ def testInfoOne(self): def testInfoClass(self): info = inspectutils.Info(tc.NoDefaults) self.assertEqual(info.get('type_name'), 'type') - self.assertIn('fire/test_components.py', info.get('file')) + self.assertIn(os.path.join('fire', 'test_components.py'), info.get('file')) self.assertGreater(info.get('line'), 0) def testInfoClassNoInit(self): @@ -106,7 +107,7 @@ def testInfoClassNoInit(self): self.assertEqual(info.get('type_name'), 'classobj') else: self.assertEqual(info.get('type_name'), 'type') - self.assertIn('fire/test_components.py', info.get('file')) + self.assertIn(os.path.join('fire', 'test_components.py'), info.get('file')) self.assertGreater(info.get('line'), 0)