Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cpt/test/integration/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import unittest
import sys
import json
import textwrap

from conans import tools
from conans.model.ref import ConanFileReference
Expand Down Expand Up @@ -451,3 +452,17 @@ def configure(self):
self.packager = ConanMultiPackager(out=self.output.write)
self.packager.add_common_builds(pure_c=False, build_all_options_values=["qux:foo", "qux:bar", "qux:blah"])
self.packager.run()

def test_no_reference(self):
conanfile = textwrap.dedent("""
from conans import ConanFile
class Pkg(ConanFile):
def build(self):
pass
""")
self.save_conanfile(conanfile)
self.packager = ConanMultiPackager(out=self.output.write)
#with self.assertRaisesRegexp(Exception, "Specify a CONAN_REFERENCE or name and version fields in the recipe"):
self.packager.add(settings={"build_type": "Release"})
with self.assertRaises(TypeError):
self.packager.run()