Esempio n. 1
0
def ensure_eb_application_has_not_been_initialized():
    if '--help' in sys.argv:
        # Allow `pytest --help` to print
        return

    if fileoperations.inside_ebcli_project():
        exception_message = ' '.join([
            'ERROR: This directory or one of its ancestors has been `eb init`-ed. Ensure that the .elasticbeanstalk',
            'directories in this directory or above it have been deleted in order for the test suite to run.'
        ])
        io.echo(exception_message)
        exit(1)
Esempio n. 2
0
    def test_inside_ebcli_project__false(self):
        shutil.rmtree(fileoperations.beanstalk_directory, ignore_errors=True)

        self.assertFalse(fileoperations.inside_ebcli_project())
Esempio n. 3
0
 def test_inside_ebcli_project(self):
     self.assertTrue(fileoperations.inside_ebcli_project())