<commit_before>import luigi
import sciluigi as sl
import os

TESTFILE_PATH = '/tmp/test.out'

class TestTask(sl.Task):

    def out_data(self):
        return sl.TargetInfo(self, TESTFILE_PATH)

    def run(self):
        with self.out_data().open('w') as outfile:
            outfile.write('File written by luigi\n')

class TestRunTask():

    def setup(self):
        self.t = sl.new_task(TestTask)

    def teardown(self):
        self.t = None
        os.remove(TESTFILE_PATH)

    def test_run(self):
        # Run a task with a luigi worker
        w = luigi.worker.Worker()
        w.add(self.t)
        w.run()
        w.stop()

        assert os.path.isfile(TESTFILE_PATH)<commit_msg>Make sure test works with new API<commit_after>import luigi
import sciluigi as sl
import os

TESTFILE_PATH = '/tmp/test.out'

class TestTask(sl.Task):

    def out_data(self):
        return sl.TargetInfo(self, TESTFILE_PATH)

    def run(self):
        with self.out_data().open('w') as outfile:
            outfile.write('File written by luigi\n')

class TestRunTask():

    def setup(self):
        self.t = sl.new_task(self, TestTask, 'testtask')

    def teardown(self):
        self.t = None
        os.remove(TESTFILE_PATH)

    def test_run(self):
        # Run a task with a luigi worker
        w = luigi.worker.Worker()
        w.add(self.t)
        w.run()
        w.stop()

        assert os.path.isfile(TESTFILE_PATH)
{'fraction_non_alphanumeric': 0.1151685393258427, 'fraction_numerical': 0.0, 'mean_word_length': 2.3529411764705883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2235061', 'n_tokens_mistral': 491, 'n_tokens_neox': 477, 'n_words': 115}