def test_no_pycache_in_non_package(self):
    data_dir = os.path.join(self.directory, 'data')
    data_file = os.path.join(data_dir, 'file')
    os.mkdir(data_dir)
    with open(data_file, 'w'):
        pass
    compileall.compile_file(data_file)
    self.assertFalse(os.path.exists(os.path.join(data_dir, '__pycache__')))
def test_no_pycache_in_non_package(self):
    data_dir = os.path.join(self.directory, 'data')
    data_file = os.path.join(data_dir, 'file')
    os.mkdir(data_dir)
    with open(data_file, 'w'):
        pass
    compileall.compile_file(data_file)
    self.assertFalse(os.path.exists(os.path.join(data_dir, '__pycache__')))