summaryrefslogtreecommitdiff
path: root/lib/spack/spack/test/llnl/util/argparsewriter.py
blob: 1ea1a8e90604f2223d4a39462a515fb7dfb6f2d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

"""Tests for ``llnl/util/argparsewriter.py``

These tests are fairly minimal, and ArgparseWriter is more extensively
tested in ``cmd/commands.py``.
"""

import pytest

import llnl.util.argparsewriter as aw

import spack.main

parser = spack.main.make_argument_parser()
spack.main.add_all_commands(parser)


def test_format_not_overridden():
    with pytest.raises(TypeError):
        aw.ArgparseWriter("spack")