Hi<br><br>I am aware that test methods are executed in alphabetical order.<br><br>What would be the ideal/preferable way of dealing with methods that depend in the order they are being executed?<br><br>Given that:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
class TestFiles(unittest.TestCase):<br><br>    def test_second_file(self):<br>        &quot;&quot;&quot;I depend on z_file&quot;&quot;&quot;<br><br>    def test_z_file(self):<br>        &quot;&quot;&quot;I should run before second_file&quot;&quot;&quot;<br>
</blockquote><br><br>Would it be OK to alter the naming in the methods to make sure they are run in the order I need to? Even if the naming gets really weird like:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
def test_a_z_file(self)<br></blockquote><br>Or is there a different/better way to do this? I am thinking something like breaking the above example in 2 different classes and creating the setUp() and tearDown() methods for each, but wouldn&#39;t that be a little redundant?<br>
<br>Thanks again for the help!<br><br clear="all"><br>-- <br>Alfredo Deza<br><br>