Package com.python.pydev.analysis.additionalinfo.AdditionalInfoIntegrityChecker

Examples of com.python.pydev.analysis.additionalinfo.AdditionalInfoIntegrityChecker.IntegrityInfo


        }
        super.tearDown();
    }

    public void testIntegrityInModuleHasNoFile() throws MisconfigurationException {
        IntegrityInfo info = AdditionalInfoIntegrityChecker.checkIntegrity(nature, monitor, false);
        assertTrue(info.desc.toString(), info.allOk);

        File f = FileUtils.getTempFileAt(baseDir, "integrity_no_file", ".py");
        FileUtils.writeStrToFile("", f);
        addFooModule(new Module(new stmtType[0]), f);
View Full Code Here


    public void testIntegrityFileHasNoMemory() throws IOException, MisconfigurationException {
        File file = new File(TestDependent.TEST_PYSRC_LOC + "extendable/initially_not_existant.py");
        file.createNewFile();

        try {
            IntegrityInfo info = AdditionalInfoIntegrityChecker.checkIntegrity(nature, monitor, false);
            assertFalse(info.allOk);
            if (info.modulesNotInMemory.size() != 1) {
                StringBuffer notInMemo = new StringBuffer(
                        "Modules not in memory (expected only: extendable/initially_not_existant.py)\n");
                for (ModulesKey key : info.modulesNotInMemory) {
                    notInMemo.append(key);
                    notInMemo.append("\n");
                }
                fail(notInMemo.toString());
            }
            assertEquals(info.modulesNotInMemory.get(0), new ModulesKey(MOD_NAME, file));

            fixAndCheckAllOk(info);
        } finally {
            file.delete();
        }

        IntegrityInfo info = AdditionalInfoIntegrityChecker.checkIntegrity(nature, monitor, false);
        assertFalse(info.allOk);
        assertEquals(1, info.modulesNotInDisk.size());
        assertEquals(info.modulesNotInDisk.get(0), new ModulesKey(MOD_NAME, null));

        fixAndCheckAllOk(info);
View Full Code Here

TOP

Related Classes of com.python.pydev.analysis.additionalinfo.AdditionalInfoIntegrityChecker.IntegrityInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.