<div dir="auto">Hey, though I managed to solve the importing issue, in my conversation with Peter, I realized I made a rather large decision without consulting the community. <div dir="auto"><br></div><div dir="auto">In my current build, I am omitting all modules that are not part of the Bio package from executing doctests in version 2.7. </div><div dir="auto"><br></div><div dir="auto">My reason for doing that is copy-pasted below this message. Please read it for context.</div><div dir="auto"><br></div><div dir="auto">I realize that 'testseq' is the only module this change effects but is it something that we should extend to future modules? <br><div dir="auto"><br></div><div dir="auto">Best,</div><div dir="auto">Adil</div><div dir="auto"><br></div><div dir="auto"><p style="margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:15px;line-height:22.5px;background-color:rgb(255,255,255);margin-top:0px!important">That method will certainly succeed in importing the ['testseq'] module. The issue is that once the importing is complete, the doctests are run. And the doctest <em>also</em> contain an import statement. <a href="https://travis-ci.org/biopython/biopython/jobs/242258938" style="color:rgb(3,102,214);text-decoration-line:none">The doctests cause an error in 2.7</a> because they are subject to the same importing limitations as "run_tests.py". I will now describe these limitations below:</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:15px;line-height:22.5px;background-color:rgb(255,255,255)">Prior to 3.3, hierarchical importing (with "dot" notation) required a directory to be initialized with a "__init__.py" file. With the introduction of 3.3, hierarchical importing was generalized to all directories, regardless of initialization. <a href="https://travis-ci.org/biopython/biopython/builds/242258934?utm_source=github_status&utm_medium=notification" style="color:rgb(3,102,214);text-decoration-line:none">This is why my commits were passing all tests except 2.7.</a></p><p style="margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:15px;line-height:22.5px;background-color:rgb(255,255,255)">Since we can't initialize folders carelessly, its best to remove the <span style="font-weight:600">non</span>-Bio modules from the "run_tests.py" file just prior to version 3.3. All versions of python after-and-including 3.3 don't require an extra "__init__.py" file, so the doctests will run fine on 3.3, 3.4, 3.5, and 3.6. <a href="https://travis-ci.org/biopython/biopython/builds/242295426?utm_source=github_status&utm_medium=notification" style="color:rgb(3,102,214);text-decoration-line:none">That's why the most recent build passed the Travis CI test.</a></p><p style="margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:15px;line-height:22.5px;background-color:rgb(255,255,255)">I agree that my import methods were becoming overly-complicated. In the most recent build,<a href="https://github.com/biopython/biopython/pull/1269/commits/bc1ac2df57419ef93f947c12e330adc2a96190fc" style="color:rgb(3,102,214);text-decoration-line:none"> I've eliminated the complicated code in favor of just deleting <span style="font-weight:600">non</span>-Bio files.</a>The only complicated code left is limited to <em>just</em> the unit test ("test_testseq.py").</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:15px;line-height:22.5px;background-color:rgb(255,255,255)">Thankfully, the unit test for 'testseq' runs all of the same tests that are in the doctests, so we can be confident that 'testseq' is compatible with all versions of python. In the future, if "biopython" decides to stop supporting python 2.7, I would be happy to remove the last bit of complicated code.</p><p style="margin-top:0px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:15px;line-height:22.5px;background-color:rgb(255,255,255);margin-bottom:0px!important"><span style="font-weight:600">TL:DR - In 2.7 only: Modules outside 'Bio' package <em>can</em> be imported from "run_tests.py", however, their doctests will likely fail because they must also contain import statements. It's best to remove them from doctesting in earlier versions of python and allow the unit tests to confirm compatibility. (Only for non-Bio files in only 2.7).</span></p></div><div dir="auto"><br></div><div dir="auto"><br></div></div></div>