示例#1
0
    def test_defaults(self):
        args = m.parse_args(['dir/scriptname.py'])

        self.assertEqual(working_directory().path, args.datastore)

        self.assertEqual(
            m.TEMPORARY_DIRECTORY,
            args.script_working_directory)

        self.assertEqual(
            m.get_virtualenv_parent_dir(),
            args.virtualenv_parent_directory)
示例#2
0
    def test_relative_script_path(self):
        args = m.parse_args(['relative/script/path/scriptname.py'])

        self.assertEqual(
            (working_directory() / 'relative/script/path/scriptname.py').path,
            args.script_path)
示例#3
0
    def test_absolute_script_path(self):
        args = m.parse_args(['/absolute/script/path/scriptname.py'])

        self.assertEqual(
            '/absolute/script/path/scriptname.py',
            args.script_path)